Asp.net生成htm静态页面实现代码 (4)
95 sw = new StreamWriter(Server.MapPath("htm/") + fileName, false, code);
96 sw.Write(str);
97 sw.Flush();
98
99 }
100 catch (Exception ex)
101 ...{
102 throw ex;
103 }
104 finally
105 ...{
106 sw.Close();
107 Response.Write("恭喜<a href=htm/" + fileName + " target=_blank>" + fileName + "</a>已经生成,保存在htm文件夹下!");
108 }
109
110 }
111 }

[
1] [
2] [
3]
[4] 