Asp.Net How to write Css File or File Write in Asp.Net

StreamWriter sw = File.CreateText(Server.MapPath(@”css\admin.css”));
File.WriteAllText(Server.MapPath(@”css\temp.css”), txtCSS.Text);

string sSource = Server.MapPath(@”css\temp.css”);
string sExepath = Server.MapPath(@”css\admin.css”);

// Copy the file.
File.Copy(sSource, sExepath, true);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s