Mahesh Chand
What is Pre-Render event in ASP.NET?
By Mahesh Chand in ASP.NET on May 25 2012
  • Dawood Abbas
    Nov, 2014 27

    How to generate this event?..mean like double click on page then "page_load" event will generate then how about "Page_PreRender" event?

    • 2
  • vigneshwa ran
    Aug, 2013 13

    PreRender is the event that takes place before the HTML for a given page is generated and sent to the browser

    • 2
  • Amit Kumar Singh
    Feb, 2016 4

    Use this event to perform any updates before the server control is rendered to the page. Any changes in the view state of the server control can be saved during this event. Such changes made in the rendering phase will not be saved.

    • 1
  • Devesh Omar
    Jun, 2014 5

    In this event All the values of controls saves to Viewstate. After this event modification in page is not possible We can do final changes in this event before rendering this page

    • 1
  • joshi nehal
    Oct, 2013 12

    Page_Load happens often too soon; Page_PreRender is the last moment before the page's HTML is actually rendered for the browser and in many cases is the best place to set attributes on user controls.This because during the web form (page) life cycle there are other events in the page (and in the user controls contained in the page...) which sometimes remove/replace/overwrite (really) those attributes so the only way you can get those attributes to the browser is to append them after all other life cycle events have been fired and handled, in the Page_PreRender.

    • 1
  • Nandha Kumar Nagarajan
    Jul, 2019 16

    What is Rending ?

    1. Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream object of the page's Response property.

    What is pre-Render?

    1. Raised after the Page object has created all controls that are required in order to render the page, including child controls of composite controls. (To do this, the Page object calls EnsureChildControls for each control and for the page.)

    The Page object raises the PreRender event on the Page object, and then recursively does the same for each child control. The PreRender event of individual controls occurs after the PreRender event of the page.

    Use the event to make final changes to the contents of the page or its controls before the rendering stage begins.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS