简单C#生成静态及相关读取模板文件

商帝国咨询头像

阅读 17809 | 分类:文章

 string gh = HttpRuntime.AppDomainAppPath;

        StreamReader reader = new StreamReader(gh+"/33.htm", Encoding.GetEncoding("gb2312"));

        string html = reader.ReadToEnd();

        html = html.Replace("<!--123-->", "好好");

        Response.Write(html);

        StreamWriter sw = new StreamWriter(Server.MapPath("311.htm"), false, System.Text.Encoding.GetEncoding("GB2312"));

        sw.WriteLine(html);

        sw.Flush();

        sw.Close();

留言区(共0条)

暂无留言,快来抢占沙发~
作者声明:非原创
平台声明:文章及评论仅代表作者本人观点,五略商书系信息发布平台,仅提供信息存储空间服务,如有侵权,请联系13521509118。转载请注明作者和出处:转自五略商书m.shangdiguo.com,作者商帝国咨询!