Thread: Page_Prerender
View Single Post
  #5 (permalink)  
Old May 17th, 2011, 10:00 AM
markhh markhh is offline
Authorized User
Points: 303, Level: 6
Points: 303, Level: 6 Points: 303, Level: 6 Points: 303, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: , , United Kingdom.
Posts: 71
Thanks: 23
Thanked 0 Times in 0 Posts
Default

Hi Imar and many thanks for your reply. "The event is raised by the Page class automatically.!" the event being the Page_Prerender. That's good, i am getting there.

"The code in the constructor then assigns a method that will be called to handle the event." As below
public BasePage()
{
this.PreRender += newEventHandler(Page_Prerender);
}


How does the page class know to run the BasePage() constructor?. I guess this is where my problem is. I know this is wrong but the way I am looking at it the code should be something like, the Page_Prerender method called from within the Page_Prerender class.

Public Page_Prerender()
{
// Page_Prerender code
}


Many thanks
Mark
Reply With Quote