Render方法生成静态页
//请参考下面的例子void Page_Load(){
.
Response.Charset="";
this.EnableViewState =false;
StringWriter tw=new StringWriter();
HtmlTextWriter wt =new HtmlTextWriter(tw);
string path=@"c: est.htm";
//FileInfo info =new FileInfo(@"c: est.txt");
StreamWriter wter = File.CreateText(path);
//输出所有信息
this.RenderControl(wt);
wter.Write(tw.ToString());
//Response.Write(tw.ToString());
wter.Close();
wt.Close();
tw.Close();
Response.End();
//生成相应文件,然后定向到该文件
Response.Redirect(path);
}
补充:Web开发 , ASP.Net ,