.net读取html文件并输出

 public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            System.Text.Encoding code = System.Text.Encoding.GetEncoding("gb2312");
            string filepath = context.Server.MapPath("/html/SeeResume.htm");
            System.IO.StreamReader reder = new System.IO.StreamReader(filepath, code);
            string htmls = reder.ReadToEnd();
            context.Response.Write(htmls);
        }

posted on 2012-01-07 15:34  larryle  阅读(1127)  评论(0)    收藏  举报