css不能调用aspx的标签;
将aspx转换成html,可以参考一下用IO流输出
.css文件不能调用aspx的标签
protected override void Render(HtmlTextWriter writer)
{
System.IO.StringWriter html = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter tw = new HtmlTextWriter(html);
base.Render(tw);
System.IO.StreamWriter sw = new System.IO.StreamWriter(Server.MapPath("index.html"), false, System.Text.Encoding.UTF8);
sw.Write(html.ToString());
sw.Close();
tw.Close();
Response.Redirect("index.html");
}
你的意思是这样用吗?