![]() |
|
|
|||||||
![]() |
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 Mark Rae |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Load .aspx page on another frame from TreeView Event | Sangeeth | Software | 0 | 06-25-2009 09:20 AM |
| master page does not change due to preinit event not firing | franchise63 | General Help Related Topics | 0 | 02-13-2008 09:18 AM |
| RIP HD-DVD? - HD-DVD CES Event Canceled | Air Raid | DVD Video | 0 | 01-05-2008 03:06 AM |
| How do find out if a button was clicked before the textchanged event of textbox fires | Jack | General Help Related Topics | 0 | 10-27-2006 10:19 AM |
| SUPER BOWL GALA EVENT, tickets available | TheLeiterSideYGB | DVD Video | 1 | 01-06-2004 11:55 PM |