Frequently asked ASP.NET Interview Questions with Answers for both freshers and working professionals,designed by our experienced .NET Consultant.

faq
1. What is the basic difference between ASP and ASP.NET?

The basic difference between ASP and ASP.NET is that ASP is interpreted; whereas, ASP.NET is compiled. This implies that since ASP uses VBScript; therefore, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).

2. What are the types of Authentication in ASP.NET?

There are three types of authentication available in ASP.NET:

  • Windows Authentication:This authentication method uses built-in windows security features to authenticate user.
  • Forms Authentication:authenticate against a customized list of users or users in a database.
  • Passport Authentication:validates against Microsoft Passport service which is basically a centralized authentication service.

3. What is IIS? Why is it used?

Internet Information Services (IIS) is created by Microsoft to provide Internet-based services to ASP.NET Web applications. It makes your computer to work as a Web server and provides the functionality to develop and deploy Web applications on the server. IIS handles the request and response cycle on the Web server. It also offers the services of SMTP and FrontPage server extensions. The SMTP is used to send emails and use FrontPage server extensions to get the dynamic features of IIS, such as form handler.

4. What is Query String? What are its advantages and limitations?

The Query String helps in sending the page information to the server.

Advantages of Query String:

  • Every browser works with Query Strings.
  • It does not require server resources and so does not exert any kind of burden on the server.

Limitations of Query String:

  • Information must be within the limit because URL does not support many characters.
  • Information is clearly visible to the user, which leads to security threats.

5. What is ViewState?

The ViewState is a feature used by ASP.NET Web page to store the value of a page and its controls just before posting the page. Once the page is posted, the first task by the page processing is to restore the ViewState to get the values of the controls.

6. What is a Cookie? Where is it used in ASP.NET?

Cookie is a lightweight executable program, which the server posts to client machines. Cookies store the identity of a user at the first visit of the Web site and validate them later on the next visits for their authenticity. The values of a cookie can be transferred between the user’s request and the server’s response.

7. What are the HTML server controls in ASP.NET?

HTML server controls are similar to the standard HTML elements, which are normally used in HTML pages. They expose properties and events that can be used programmatically. To make these controls programmatically accessible, you need to specify that the HTML controls act as a server control by adding the runat=”server” attribute.

8. What events are fired when a page loads?

The following events fire when a page loads:

  • Init()- Fires when the page is initializing.
  • LoadViewState()- Fires when the view state is loading.
  • LoadPostData()- Fires when the postback data is processing.
  • Load()- Fires when the page is loading.
  • PreRender()- Fires at the brief moment before the page is displayed to the user as HTML.
  • Unload()- Fires when the page is destroying the instances of server controls.

9. How can we identify that the Page is Post Back?

Page object has an “IsPostBack” property, which can be checked to know that is the page posted back.

10. Differentiate globalization and localization.

The globalization is a technique to identify the specific part of a Web application that is different for different languages and make separate that portion from the core of the Web application. The localization is a procedure of configuring a Web application to be supported for a specific language or locale.

Check out our latest updated ASP .NET Training Topics

See Also : Asp.Net Interview Questions and Answers – Set 2