Few lines about PreRender event

writing @Image courtesy of cooldesign/ FreeDigitalPhotos.net

Few lines about PreRender event

Welcome to CodeSpread!


To know PreRender and understand its  importance, we should know the events before it and after it. We start with,

Page object including all controls are loaded and the page is ready to be rendered to the output. Here, as a last event before PreRender, Handle Postback event is fired.

Handle PostBack Event: This event is caused by the postback trigger of any controls from client side.


Prerender:  For this event, all controls are available and it is the last stage where we have access to the controls so any operation before the server control is rendered can be performed here. Any changes in the view state of the server control can be saved during this event.


Save ViewState:  ViewState is a property of a control and for all the controls, their viewstate will be saved to their own viewstate collection. The resultant viewstate is serialized, hashed, base24 encoded and is sent to the client as a hidden variable, _viewstate.

Page is rendered to the client in HTML form.

Conclusion: PreRender event is used to make final changes to the contents of the page or its controls before the rendering stage begins.

Note: Databinding is raised after the control’s PreRender event, This event marks the beginning of the process that binds the control to the data.

Author: hershey

A passion for knowledge drives me to do programming, A passion for programming drives me to create something different, A passion for creation drives me to spread the knowledge.

Share This Post On


  1. nice superb explaination

    Post a Reply
  2. thanks for the tutorial
    I am having a problem.
    The feature “Create SQL server database” isn’t available , I can’t select it.
    Can you help, please ?

    Post a Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

More from CodeSpread:

  • How To: Cross Page PostingHow To: Cross Page PostingWhat is a POST? Wikipedia says,The POST request method is designed to request that a web server accept the data enclosed in the request message's body for storage.It is often used when uploading a...
  • Short Note on HTTP-GET, HTTP-POST and SOAPShort Note on HTTP-GET, HTTP-POST and SOAPWeb service/WCF services/Rest Services may support HTTP-GET, HTTP-POST or SOAP protocols, which is the underlying way, where request-response communication happens between a client and server. HTT...
  • ASP.NET : Stick to the ContextASP.NET : Stick to the ContextWhat we are talking about? We are talking about HttpContext Class. It is a part of System.Web namespace/assembly and is usually referred by, [code] System.Object System.Web.HttpContext [...
  • Few lines about WCF metadataFew lines about WCF metadataWhat is WCF metadata? WCF generates metadata for service endpoints and this metadata is used to describe how to interact with the service's endpoints. This information is used by Svcutil.exe to ge...
  • Maintain Page State on Browser’s Back Button ClickMaintain Page State on Browser’s Back Button ClickThis is a very common requirement and a major expectation for a quality user experience. Scenario: User visits a site which heavily uses AJAX. Here, AJAX will not let the user navigate from the p...
  • OLAP : On-line Analytical Processing OLAP : On-line Analytical Processing What is OLAP? We know that there are two kinds of database applications available, OLAP and OLTP. Before we go for OLAP, I would like to tell you something about OLTP. OLTP is On-line Transaction...
  • IQueryable: Performance boost over remote Data AccessIQueryable: Performance boost over remote Data AccessIf we also follow the inheritance principle like OOPS programming, we need to extend our previous discussion “IEnumerable: Power behind Collections”. So this will lead us to write something about I...
  • RegisterClientScriptBlock, RegisterClientScriptIncludeRegisterClientScriptBlock, RegisterClientScriptInclude"Current trends are more inclined towards the client model for a better UI experience where small pieces of client script are integrated into the application." These client scripts can be declarat...