[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Change Theme in web.config with button click event

Posted on 2006-11-20
5
Medium Priority
?
541 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:gogetsome
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 28

Expert Comment

by:mmarinov
ID: 17980699
You can change programmatically the theme using such code:

case "Blue":
            Page.Theme = "BlueTheme";
            break;
        case "Pink":
            Page.Theme = "PinkTheme";
            break;

regards
0
 

Author Comment

by:gogetsome
ID: 17981023
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.
0
 

Author Comment

by:gogetsome
ID: 17981087
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
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 18449374
PAQed with points refunded (500)

DarthMod
Community Support Moderator
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question