ASP.NET如何生成HTML页面? RT 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.code-123.com/html/2008719231951580.html请参考。 可以用发送http请求,获取页面,然后写入文件 string mbPath = Server.MapPath("htm/view_page.htm"); Encoding code = Encoding.GetEncoding("gb2312"); StreamReader sr = null; StreamWriter sw = null; string str = null; try { sr = new StreamReader(mbPath, code); str = sr.ReadToEnd(); } catch (Exception ex) { throw ex; } finally { sr.Close(); } string fileName = DateTime.Now.ToString("yyyyMMddHHmmss") + ".htm"; str = str.Replace("$time$", "123");//替换time str = str.Replace("$click$", "123");//替换click str = str.Replace("$title$", "123");//替换Title str = str.Replace("$content$", "123");//替换content try { sw = new StreamWriter(Server.MapPath("htm/")+fileName, false, code); sw.Write(str); sw.Flush(); } catch (Exception ex) { throw ex; } finally { sw.Close(); Response.Redirect("htm/" + fileName); }等先给个HTML的模版 数据量大按钮提交会响应失败问题 Panel控件 隐藏后显示的问题 郁闷的问题 对树的操作 关于一个类的编写方法(急!) 怎样把CheckBoxList做只选中其中一个?????急急急,分不够再给!!!!! 我用vs写代码,好多不方便的地方,大家都是怎么解决的? .htm页面如何接受参数? GridView带摸板列的分页实现(局部刷新)? 借个人气:哪里有SQL函数手册可以下载? textbox利用ajax可不可以类似javascript的onblur的触发事件 怎么知道哪个版本的IE对应哪个版本的html呢?
string mbPath = Server.MapPath("htm/view_page.htm");
Encoding code = Encoding.GetEncoding("gb2312");
StreamReader sr = null;
StreamWriter sw = null;
string str = null; try
{
sr = new StreamReader(mbPath, code);
str = sr.ReadToEnd(); }
catch (Exception ex)
{
throw ex;
}
finally
{
sr.Close();
}
string fileName = DateTime.Now.ToString("yyyyMMddHHmmss") + ".htm";
str = str.Replace("$time$", "123");//替换time
str = str.Replace("$click$", "123");//替换click
str = str.Replace("$title$", "123");//替换Title
str = str.Replace("$content$", "123");//替换content try
{
sw = new StreamWriter(Server.MapPath("htm/")+fileName, false, code);
sw.Write(str);
sw.Flush(); }
catch (Exception ex)
{
throw ex;
}
finally
{
sw.Close();
Response.Redirect("htm/" + fileName);
}等先给个HTML的模版