日期:2014-05-16  浏览次数:20742 次

ASPX文件生成HTML文件

TextWriter HWriter = new StreamWriter(MapPath("../index.html"));//读入HTML文件,可以是空文件
??????? HtmlTextWriter HEWriter = new HtmlTextWriter(HWriter);

??????? using (StreamReader aspxReader = new StreamReader(MapPath("../Default.aspx")))
??????? {
??????????? HEWriter.Write(aspxReader.ReadToEnd());
??????? }

??????? HEWriter.Close();?