How to make dynamic css?

Posted by Sf_Hussain786 under ASP.NET on 3/26/2012 | Points: 10 | Views : 2473 | Status : [Member] | Replies : 4
Hi All Members,

I want to know you how to make a dynamic css? its mean change css background color margin number etc change from a aspx panel .....

its possible?????


Reagards,

sf_hussain786


Responses

Posted by: Sksamantaray on: 3/26/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,
Use this:
http://www.dotnetfunda.com/forums/thread8518-loading-css-dynamically-in-a-page.aspx

Thanks,
Sanjay

Sf_Hussain786, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

visit this link

http://stackoverflow.com/questions/449237/dynamically-setting-css-values-using-asp-net



R D Patel

Sf_Hussain786, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

another nice link

http://www.codeproject.com/Articles/14033/Dynamic-CSS-Styling-in-ASP-NET-A-Flexible-Approach

R D Patel

Sf_Hussain786, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/26/2012 [Member] Silver | Points: 25

Up
0
Down
Hi ,
This is a working code i have used in my project:
HtmlLink link = new HtmlLink();


link.Href = "~/css/" + Session["Theme"].ToString().Trim() + ".css";

link.Attributes["rel"] = "stylesheet";

link.Attributes["type"] = "text/css";

Page.Header.Controls.Add(link);


Thanks,
Sanjay

Sf_Hussain786, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response