![]() |
|
|
|||||||
![]() |
ASP Net - Do Masterpages have a PreInit event? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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. needin4mation@gmail.com |
|
|
|
|
#2 |
|
Posts: n/a
|
<> wrote in message
news: ups.com... > 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? MasterPages don't have a PreInit method natively. However, this is not a particularly difficult thing to achieve using inheritance: http://www.google.co.uk/search?sourc...+inherit+theme |
|