Interview FAQs

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.

Response.Redirect: A new request is generated from client-side for redirected page. Its a kind of additional round trip. As new request is generated from client, so the new URL is visible to user in browser after redirection.
Server.Transfer: A request is transferred from one page to another without making a round trip from client. For the end user, URL remains the same in browser even after transferring to another page.

Custom controls are basically compiled code i.e. DLLs. These can be easily added to toolbox, so it can be easily used across multiple projects using drag and drop approach. These controls are comparatively hard to create.
User Controls (.ascx) are just like pages (.aspx). These are comparatively easy to create but tightly couple with respect to User Interface and code. In order to use across multiple projects, we need to copy and paste to the other project as well.

 ASP.NET provides a mechanism called view state. Hidden form fields are used to store the state of objects on client side and returned back to server in subsequent request (as postback occurs).

GridLayout provides absolute positioning for controls placed on the page. Developers that have their roots in rich-client development environments like Visual Basic will find it easier to develop their pages using absolute positioning, because they can place items exactly where they want them. On the other hand, FlowLayout positions items down the page like traditional HTML. Experienced Web developers favor this approach because it results in pages that are compatible with a wider range of browsers.

If you look in to the HTML code created by absolute positioning you can notice lot of DIV tags. While in Flow layout you can see more of using HTML table to position elements which is compatible with wide range of browsers.

The system.Diagnostics namespace contains the Debug and Trace classes that include shared methods.The difference between these two classes is in the way Trace and Debug statements are treated at the of creating a release build.

  • Trace statements are included by default when the program is compiled in to release build,where as debug statements are not.
  • The Debug class is used for debugging,however, the Trace class is used for testing and optimization even after an application is compiled and released.

ASP.NET supports different session state storage options:

  • In-Process is the default approach. It stores session state locally on same web server memory where the application is running.
  • StateServer mode stores session state in a process other than the one where application is running. Naturally, it has added advantages that session state is accessible from multiple web servers in a Web Farm and also session state will remain preserved even web application is restarted.
  • SQLServer mode stores session state in SQL Server database. It has the same advantages as that of StateServer.
  • Custom modes allows to define our custom storage provider.
  • Off mode disables session storage.

ASP.NET Web Forms uses Page controller pattern approach for rendering layout. In this approach, every page has its own controller i.e. code-behind file that processes the request. 

 ASP.NET MVC uses Front Controller approach. In this approach a common controller for all pages, processes the requests.

A postback is a request sent from a client to server from the same page user is already working with.ASP.NET was introduced with a mechanism to post an HTTP POST request back to the same page. Its basically posting a complete page back to server (i.e. sending all of its data) on same page. So, the whole page is refreshed.Another concept related to this approach is "Callback" that is also asked sometimes during a technical interview question. Click here to understand Postback Vs Callback in ASP.NET.

ASP.NET includes a number of built-in server controls that are the foundation of its Web programming model. They have various properties to control their behavior and appearance. These controls provide an event model where events are handled on the server (whereas HTML controls are handled in the client). Server controls have the ability to maintain state (via ViewState) across requests, and they can automatically detect the browser. With these controls, you will see the RunAt attribute (RunAt="Server") that signals its processing will be done on the server. A good example of these controls is the basic TextBox control (<ASP:TextBox RunAt="Server" .... >.

PreviousDisplaying 39 of 46Next
Need Help? Contact Us.

Log in


Forgot password?


New User