Geeks With Blogs
Pankaj Tahiliani November 2008 Entries
The 'MasterPageFile' property can only be set in or before the 'Page_PreInit' event.
Author : Pankaj Tahiliani Technology : ASP.NET Error : The 'MasterPageFile' property can only be set in or before the 'Page_PreInit' event. Solution : At this point, the logical step is to move the line of code into Page_PreInit. Doing this in a real ASPX page avoids the above error (but doesn’t quite actually work). You need to OVERRIDE the PreInit event. Protected Overrides Sub OnPreInit(ByVal e As System.EventArgs) '++++++++++++++++++++++++++... ' Check for login ' if logged in ......

Posted On Saturday, November 29, 2008 1:27 AM

Copyright © Pankaj Tahiliani | Powered by: GeeksWithBlogs.net