.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles

What happens when ASP.NET page is requested

Posted By:Abhisek Panda       Posted Date: December 19, 2009    Points: 10    Category: ASP.NET    URL: http://www.dotnetspark.com  

What happens when ASP.NET page is requested:-

          Consider an simple application for Login operation which has two files(Login.aspx and Login.aspx.cs). Then let us see what happens when the page is accessed for the first time.

1. The ASP.NET runtime processes the .aspx file and generates a partial class(Login) that contains the declarations for the form and its controls, and a class(Login_aspx) that contains the code that will initialise the form, instantiate the controls and generate the HTML for the web page.

2. The C# compiler compiles the partial class that contains the control declarations with the partial class defined by the code-behind file for the form into an assembly(.dll) that provides the event handling code for the requested page.

3. The C# compiler compiles the Login_aspx class and saves the result as an assembly that is executed when the page is requested.

4. The C# compiler also compiles any other class files that are stored in the application's App_Code folder. These classes are saved in a single assembly.

5. ASP.NET creates an instance of the page from the page's final assembly. Then, ASP.NET raises the appropriate event which are processed by the event handlers for the page and the page generates the HTML that is passed back to the IIS for the response.
 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend