当前位置:首页 > 网站运营 > seo搜索优化 > > 动态生成Html静态页

动态生成Html静态页

点击次数:57 次 发布日期:2008-11-23 19:10:27 作者:源代码网
源代码网推荐 #e# public string temp = HttpContext.Current.Server.MapPath("write.htm");
源代码网推荐 public Encoding code = Encoding.GetEncoding("gb2312");
源代码网推荐 public StreamReader sr=null;
源代码网推荐 public string str="";
源代码网推荐
源代码网推荐 public StreamWriter sw=null;
源代码网推荐 public string htmlfilename=DateTime.Now.ToString("yyyyMMddHHmmss")+".html";//文件名
源代码网推荐 private void Page_Load(object sender, System.EventArgs e)
源代码网推荐 {
源代码网推荐 try
源代码网推荐 {
源代码网推荐 sr = new StreamReader(temp, code);
源代码网推荐 str = sr.ReadToEnd(); // 读取文件
源代码网推荐 }
源代码网推荐 catch(Exception exp)
源代码网推荐 {
源代码网推荐 HttpContext.Current.Response.Write(exp.Message);
源代码网推荐 HttpContext.Current.Response.End();
源代码网推荐
源代码网推荐 }
源代码网推荐 finally
源代码网推荐 {
源代码网推荐 sr.Close();
源代码网推荐 }
源代码网推荐 //-------------------------------------------------------------------
源代码网推荐 //-------------------------------------------------------------------
源代码网推荐 //-------------------------------------------------------------------
源代码网推荐 try
源代码网推荐 {
源代码网推荐 sw = new StreamWriter(Server.MapPath(htmlfilename) , false, code);
源代码网推荐 str = str.Replace("aa","chi");//文本替代
源代码网推荐
源代码网推荐 sw.Write(str);
源代码网推荐 sw.Flush();
源代码网推荐 }
源代码网推荐 catch(Exception ex)
源代码网推荐 {
源代码网推荐 HttpContext.Current.Response.Write(ex.Message);
源代码网推荐 HttpContext.Current.Response.End();
源代码网推荐 }
源代码网推荐 finally
源代码网推荐 {
源代码网推荐 sw.Close();
源代码网推荐 }
源代码网推荐
源代码网推荐
源代码网推荐 }
源代码网推荐
源代码网推荐
源代码网推荐-------------------------
源代码网推荐引用------using System.IO;//必用到的命名空间-
源代码网推荐
源代码网推荐
源代码网推荐2005-04-12
源代码网推荐
源代码网推荐
源代码网推荐动态生成Html静态页
源代码网推荐
源代码网推荐public string temp = HttpContext.Current.Server.MapPath("write.htm");
源代码网推荐 public Encoding code = Encoding.GetEncoding("gb2312");
源代码网推荐 public StreamReader sr=null;
源代码网推荐 public string str="";
源代码网推荐
源代码网推荐 public StreamWriter sw=null;
源代码网推荐 public string htmlfilename=DateTime.Now.ToString("yyyyMMddHHmmss")+".html";//文件名
源代码网推荐 private void Page_Load(object sender, System.EventArgs e)
源代码网推荐 {
源代码网推荐 try
源代码网推荐 {
源代码网推荐 sr = new StreamReader(temp, code);
源代码网推荐 str = sr.ReadToEnd(); // 读取文件
源代码网推荐 }
源代码网推荐 catch(Exception exp)
源代码网推荐 {
源代码网推荐 HttpContext.Current.Response.Write(exp.Message);
源代码网推荐 HttpContext.Current.Response.End();
源代码网推荐
源代码网推荐 }
源代码网推荐 finally
源代码网推荐 {
源代码网推荐 sr.Close();
源代码网推荐 }
源代码网推荐 //-------------------------------------------------------------------
源代码网推荐 //-------------------------------------------------------------------
源代码网推荐 //-------------------------------------------------------------------
源代码网推荐 try
源代码网推荐 {
源代码网推荐 sw = new StreamWriter(Server.MapPath(htmlfilename) , false, code);
源代码网推荐 str = str.Replace("aa","chi");//文本替代
源代码网推荐
源代码网推荐 sw.Write(str);
源代码网推荐 sw.Flush();
源代码网推荐 }
源代码网推荐 catch(Exception ex)
源代码网推荐 {
源代码网推荐 HttpContext.Current.Response.Write(ex.Message);
源代码网推荐 HttpContext.Current.Response.End();
源代码网推荐 }
源代码网推荐 finally
源代码网推荐 {
源代码网推荐 sw.Close();
源代码网推荐 }
源代码网推荐
源代码网推荐
源代码网推荐 }
上一页12 下一页 源代码网供稿.
网友评论 (0)
会员中心
网站运营
本站推荐
网站运营之精华