Hi... I am having css in string like this...
String strClass = ".heading{font-family:Latha;font-size:30px;}.heading1{font-family:Latha;font-size:30px;}";
I need to save this string as css file(sample.css).... If any ideas means, share with me pls
Hi,
Do you mean
http://msdn.microsoft.com/en-us/library/system.io.file.writealltext.aspx ?
Kowing your overall goal could help. For example ASP.NET supports "themes" that allows to have distinct sets of CSS files. VS 2013 has other options to preprocess CSS files etc...
Consider include it in aspx without saving as file
in c#
protected string strClass;
protected void Page_Load(object sender, EventArgs e)
{
strClass = ".heading{font-family:Latha;font-size:30px;}.heading1{font-family:Latha;font-size:30px;}";
}
in aspx
沒有留言:
張貼留言