Logo F2FInterview

ASP .NET Interview Questions

Q   |   QA
‹‹ previous123456

ASP.NET is a Web application framework developed and marketed by Microsoft to allow programmers to build dynamic Web sites, Web applications and Web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language. The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP messages.

we know Http is an state-less protocol which is required for interaction between clinet and server .
so there is an need to remeber state of request raised by an web browser so that
web server can recognize you have already previously visited or not.

There are two types of state management techniques:

  1. Client side state management
  2. Server – side statemanagement

Using cookies comes under clinet side statemanagement .In HttpResponse we write
Cookie containing sessionId and other information within it.

when a browser made a request to the web server the same cookie is sent to the server where server recognize the session id and get other information stored to it previously.

Following are the events occur during ASP.NET Page Life Cycle:

  1. Page_PreInit
  2. Page_Init
  3. Page_InitComplete
  4. Page_PreLoad
  5. Page_Load
  6. Control Events
  7. Page_LoadComplete
  8. Page_PreRender
  9. SaveViewState
  10. Page_Render
  11. Page_Unload

Among above events Page_Render is the only event which is raised by page. So we can’t write code for this event.

there are 3 types of controls:

  1. User Control
  2. Custom Control
  3. Web parts

you can reuse User control in the current project in which you have built it, but you can’t move it to other project as unless you just copy paste the same file there and make the changes for that project ( which violets the concept of library).

but custom control can be shared between projects. and you can precompile them even as a dll, so this means you can use them in library of any type.

  • Application Object and Cached Object both falls under Server side State Management.
  • Application object resides in InProc i.e. on the same server where we hosted our application.
  • Cache Object resides on server side/ DownStream/Client Side.
  • Application Object will be disposed once application will stop.
  • Cache Object can be disposed using Time based cache dependency.
  • Only one user can access Application Object at a time hence we have to lock it every time we modify it.

‹‹ previous123456

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: