Do Masterpages have a PreInit event?

N

needin4mation

I have this code. The preinit never fires:

public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Label1.Text = Profile.FullName;
}
}
protected void Page_PreInit(object sender, EventArgs e)
{
Response.Write("HI");
Page.Theme = Profile.MyTheme;
}
}

If I can't have a preinit in my masterpage, how can I dynamically set
the theme for all the pages based upon that theme? Thanks for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top