Hi I know Load event procedure fires when the page has been loaded and PreRender before of that. I can not properly figure out when(which intention?) using Page PreRender event procedure thanks
PreRender comes after the Load event Heres some of the events in the order that they fire Init Load 'now the control events fire. like button clicks dropdowns etc... PreRender Render Any code that is dependent on a control event should be put into PreRender.
for example: if a button click sets a session variable to a new value, you wont see the new value in Load but you would see the new value in PreRender.
For example, could anybody tell me why this code only works inside Page_PreRender? whether put into Page_Load nothing happens
private void Page_PreRender(object sender, System.EventArgs e)
{
// Update the database with changes from the data set.
sqlDataAdapter1.Update(dataSet11);
// Refresh data grid just before the page is displayed.
DataGrid1.DataBind();
}
lofquest
Participant
1090 Points
218 Posts
PreRender
Feb 02, 2004 09:53 AM|LINK
mbanavige
All-Star
134967 Points
15422 Posts
ASPInsiders
Moderator
MVP
Re: PreRender
Feb 02, 2004 12:11 PM|LINK
lofquest
Participant
1090 Points
218 Posts
Re: PreRender
Feb 02, 2004 12:14 PM|LINK
private void Page_PreRender(object sender, System.EventArgs e) { // Update the database with changes from the data set. sqlDataAdapter1.Update(dataSet11); // Refresh data grid just before the page is displayed. DataGrid1.DataBind(); }thankslofquest
Participant
1090 Points
218 Posts
Re: PreRender
Feb 02, 2004 12:29 PM|LINK