gogetsome
asked on
Change Theme in web.config with button click event
Hello, I'm learning about themes and have creted two themes: blue and green. I have set the initial theme to blue in the web.config with this: <pages theme="blue">
I have two buttons on a master page one for green and one for blue. How can I switch between themes with the button's click event?
I have two buttons on a master page one for green and one for blue. How can I switch between themes with the button's click event?
ASKER
Thanks mmarinov for your post. Yes, that method (page.theme = "Blue") would work if in the Page_PreInit event but the master page does not have that option and I want to be able to change all of the pages loading into the master page to reflect which theme the user selects. A good example it the www.msn.com.
ASKER
Here is a good solution to my problem if anyone is interested. I added my skins to his example and it's all good.
http://staff.develop.com/ballen/blog/PermaLink.aspx?guid=09befce7-f48e-4555-891c-13818fd75a56
http://staff.develop.com/ballen/blog/PermaLink.aspx?guid=09befce7-f48e-4555-891c-13818fd75a56
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
case "Blue":
Page.Theme = "BlueTheme";
break;
case "Pink":
Page.Theme = "PinkTheme";
break;
regards