View Single Post
  #2 (permalink)  
Old January 8th, 2007, 07:39 PM
thenoseknows thenoseknows is offline
Friend of Wrox
 
Join Date: Feb 2006
Location: , , USA.
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well you wouldn't call pre_init, you would handle it if necessary by overriding it. It will always be called before the page loads on every iteration of the page life cycle. It will be called regardless of whether you handle it for yourself or "call it". At least thats my understanding of it. I think you should create a base page class that inherits from Page, handle the pre_init event in that, then inherit the base page class in every aspx page. Then in the pre_init handler you would check the request to see what page was requested and specify what master page to load dynamically. This blog post does a much better job of expaining it than I do:

http://www.odetocode.com/Articles/450.aspx

Good luck.