Runtime css
-
Hi All, Could anyone plz tell me how i can implement Css in my asp.net project at runtime. That is i have 2 different css with me, now what i want to do is I have a form named LOGIN.aspx now when i open this page from address bar i want Css1.css to be used at that time and when i open this login.aspx from any other page i want css2.css to be used. Plz suggested something Thanks in advance If you are not cheating then you are not trying
-
Hi All, Could anyone plz tell me how i can implement Css in my asp.net project at runtime. That is i have 2 different css with me, now what i want to do is I have a form named LOGIN.aspx now when i open this page from address bar i want Css1.css to be used at that time and when i open this login.aspx from any other page i want css2.css to be used. Plz suggested something Thanks in advance If you are not cheating then you are not trying
Well there are two ways: 1 Make your
<link href="style/style1.css" type="text/css" rel="stylesheet" />
run serversided, by addingrunat="server"
to the tag, like this :<link href="style/style.css" type="text/css" rel="stylesheet" runat="server" />
. Then you can change its attributes (such as the href attribute) in your .NET code. 2 Make you<link href="style/style.aspx" type="text/css" rel="stylesheet" />
, point to a ASPX file. In this aspx file you put yourif
statement. If logged in,Server.Transer["style1.css"]
, if notServer.Transfer["style2.css"]
-- modified at 5:44 Wednesday 22nd February, 2006