Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to change the css class at runtime using C# in ASP.NET MVC ?
Posted
Comments
Philippe Mori 19-Nov-15 12:39pm    
If you want to change it after the page is generated, then you have to write some JavaScript for that...

string mycss = "myClassName"; // work this out based on whatever you use to decide the class
<div class="@mycss">
</div>
 
Share this answer
 
Thanks Everyone, I got my answer

here is the link

http://forums.asp.net/t/1060687.aspx?Read+and+Write+CSS+file+from+ASP+NET
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900