asp.net读取文件

context.Response.ContentType = "text/html";

        string fullpath = context.Server.MapPath("hello.htm");

        context.Response.Write(fullpath);

        string content = System.IO.File.ReadAllText(fullpath);

        context.Response.Write(content);

你可能感兴趣的:(asp.net)