ASP.Net Interview Question and Answers

16. What is the difference between Custom Control and User Control?
  Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of web application add reference and use. Normally designed to provide common functionality independent of consuming Application.
User Controls are similar to those of ASP include files, easy to create, can not be placed in the toolbox and dragged - dropped from it. A User Control is shared among the single application files.
 
Your Name Your Email-ID
Your Answer
17. How can you identify that the page is PostBack?
  The Page object uses the IsPostBack property to check whether the page is posted back or not. If the page is postback, this property is set to true.
 
Your Name Your Email-ID
Your Answer
18. What is ViewState?
  ViewState is a .Net mechanism to store the posted data among post backs. ViewState allows the state of objects to be stored in a hidden field on the page, saved on client side and transported back to server whenever required.
 
Your Name Your Email-ID
Your Answer
19. What is Authentication and Authorization?
  Authentication is the process of identifying users. Authentication is identifying/validating the user against the credentials (username and password) and Authorization performs after authentication.
Authorization is the process of granting access to those users based on identity. Authorization allowing access of specific resource to user.
 
Your Name Your Email-ID
Your Answer
20. What are the types of Authentication?
 
    There are 3 types of Authentication. Windows, Forms and Passport Authentication.
  • Windows authentication uses the security features integrated into the Windows NT and Windows XP operating systems to authenticate and authorize Web application users.
  • Forms authentication allows you to create your own list/database of users and validate the identity of those users when they visit your Web site.
  • Passport authentication uses the Microsoft centralized authentication provider to identify users. Passport provides a way to for users to use a single identity across multiple Web applications. To use Passport authentication in your Web application, you must install the Passport SDK.
 
Your Name Your Email-ID
Your Answer