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


Top 5 Contributors of the Month
david stephan

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

 Subscribe to Articles

Asp .net Page events

Posted By:Raga       Posted Date: November 08, 2010    Points: 50    Category: ASP.NET    URL: http://www.dotnetspark.com  

This articles provides the list of all page events and View state behaviour in each page event.
 

Page Events

PreInit:   All the values from view state are reset , In this event we set a masterpage/Profile/Theme/Properties. We can create/Recreate dynamic controls. Make decisions based on time/geographic locations.

Init: We can read or write the props of those controls , Controls are initialized Skin properties are set prior to this event.

InitComplete: This event is fired after all Initializations take place. Implementation of logic which depends on the controls to be initialized can be done here.

PreLoad: View state gets initialized and all post back data gets initialized from the request objects.(Viewstate gets reconstiated).

Load: Along with page load event all Onload events for child controls gets fired.

For ex:   Textbox onload event+ textbox event handler and any properties defined gets fired.

loadComplete: Controls are loaded viewstate is reconstiated and all validations will be completed prior to this event. Any new properties can be implements on the controls in this event.

Prerender: To make any final changes to the contents of the page or controls of the page before actually converting to HTML can be taken care here.

SaveStatecomplete: Occurs before viewstate gets saved.We can implement any logic for the view state to be changed or loading to e completed and then the page is ready for getting rendered. There is no Render event  actually instead render event is associated with each and every control and will be fired dynamically.

unload: In this event we can dynamically close all the files that were opened from the file system, Release databases that were used dynamically.But could not change any content data that may raise exception

 Subscribe to Articles

     

Further Readings:

Responses

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