Welcome to MSDN Blogs Sign in | Join | Help

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

Published Monday, December 19, 2005 1:26 PM by wsteele

Comments

Monday, December 19, 2005 3:12 PM by Glarr

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

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.
Monday, December 19, 2005 3:59 PM by Mohamed Meligy

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

I think this is related to:
http://weblogs.com.pk/khurram/archive/2005/12/15/2900.aspx
(Masterpage and FindControl)
Monday, January 02, 2006 4:00 PM by zeox

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

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
Monday, January 02, 2006 4:12 PM by zeox

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

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)

# William J Steele s WebLog ASP NET Soup to Nuts Adding Pizzazz to | bar stools

Anonymous comments are disabled
 
Page view tracker