ASP.NET Soup to Nuts: Adding Pizzazz to Your Web Site

Ok... I've posted the demo code to my web site.

Default.aspx and Default2.aspx show the themes and master pages.

Default3.aspx shows the "Automation" part where you can select a theme from a drop down list box and it will automatically change.

Now... if someone can take a look at Default.aspx and tell me why it doesn't work I'll post the answer.  I can't find anything wrong with it, but it sure doesn't work.  The only difference between it and Default3.aspx is the fact that it is using a Master page.  I just copied the control and the code to Default3.aspx and it worked.

I'll post the answer here when I get it.

Thanks for watching!!!


Comments (5)

  1. Glarr says:

    This is ugly but seems to work:

    Page.Theme = Page.Request("ctl00$ContentPlaceHolder1$Themes").ToString()

    Looks like the Request takes the name of the UniqueID that the control gets when the Master Page and Contents are glommed together. "ctl00" is the Master Page, so maybe it’s a logical enough name after all.

  2. Mohamed says:

    I think this is related to:

    (Masterpage and FindControl)

  3. zeox says:

    I’have found this article

    ASP.NET 2.0 and Themes and Master Pages


  4. zeox says:

    The link i’ve posted dosen’t seems to work(you have to copy it to address bar)

    Here is another one

    There is sample solution which presents analogical behavior. Unfortunatly is much more complicate (as for my level of understanding)

Skip to main content