Thread: Page_Prerender
View Single Post
  #6 (permalink)  
Old May 17th, 2011, 10:09 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

The Page class *is* the BaseClass. When you create a page, you let it inherit BasePage. So, the request for a page is handled by your BasePage. Its base class (eg. System.Web.UI.Page) then raises the event which is handled by the method you assign in the constructor of the BasePage class.

So, actually, Page and BasePage are more or less merged into a single class. The BasePage can do whatever Page can (but not vise versa) including handling the PreRender event.

Does this clarify things?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
markhh (May 20th, 2011)