Changing css in masterpage

I have a masterpage that contains my all the css for my website, what i'm looking for is an easy way to change to other css files using a drop down box.

I would like the specific code needed to do this including the drop down box (just write it on a bare page)
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" bare"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
    <title>test</title>
    
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    
    <style type="text/css">
        @import "style.css";
    </style>
    
</head>

Open in new window

mitpatAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Amandeep Singh BhullarCommented:
Check the discussion,
http://www.daniweb.com/forums/thread68595.html

Hope this will help you
0
lazyberezovskyCommented:
Add link with runat="server" to your master page:
<head>
  <link id="linkStyles" rel="stylesheet" type="text/css" runat="server" />
</head><head>

In code behind add SelectedIndexChanged event handler to your DropDownList:
void dropDownList1_SelectedIndexChanged(Object sender, EventArgs e)
{
  string stylesheet = // get stylesheet address e.g. Server.MapPath(ropDownList1.SelectedItem.Text)
  linkStyles.Href = stylesheet;
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
robastaCommented:
you can customize this javascript to use drop down.

http://www.thesitewizard.com/javascripts/change-style-sheets.shtml
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.