您的位置:首页 > Web前端 > HTML

后台生成HTML时显示中文件方法。解决IE8显示界面的兼容

2009-09-20 22:10 567 查看
1、 注意:要添加 “using System.IO;”FileStream和StreamWriter都是IO的子类

FileStream fs = new FileStream(Server.MapPath(path + "/" + newid + ".html"), FileMode.Create, FileAccess.Write);

 StreamWriter sw = new StreamWriter(fs, Encoding.UTF8);

 sw.Write(template);

 sw.Close();

 fs.Close();

 

 

2、解决IE8显示界面的兼容

<head id="Head1" runat="server">

    <title>添加信息</title>

    <meta http-equiv="x-ua-compatible" content="ie=7" />

</head>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ie html server path io