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!!!
Bill
Comments
- Anonymous
December 19, 2005
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. - Anonymous
December 19, 2005
I think this is related to:
http://weblogs.com.pk/khurram/archive/2005/12/15/2900.aspx
(Masterpage and FindControl) - Anonymous
January 02, 2006
I'have found this article
ASP.NET 2.0 and Themes and Master Pages
http://staff.develop.com/ballen/blog/PermaLink.aspx?guid=09befce7-f48e-4555-891c-13818fd75a56
Zeox - Anonymous
January 02, 2006
The link i've posted dosen't seems to work(you have to copy it to address bar)
Here is another one http://staff.develop.com/ballen/blog/default.aspx?date=2005-01-01
There is sample solution which presents analogical behavior. Unfortunatly is much more complicate (as for my level of understanding) - Anonymous
June 18, 2009
PingBack from http://barstoolsite.info/story.php?id=4620