摘要: protected override void OnInit (EventArgs e)
{
int id;
try
{
id = int.Parse (Request.QueryString["id"]);
}
catch
{
throw (new Exception ("页面没有指定id"));
}
string filename=Server.MapPath("statichtml_"+id+".html");
//尝试读取已有文件
Stream s = GetFileStream (filename);
if (s != null)//如果文件存在并且读取成功
{
using (s)
{
Stream2Stream (s, Response.OutputStream);
Response.End (
阅读全文