请问怎么根据一段html字符串生成一个.htm文件 using System.IO;StreamWriter sw = new StreamWriter("yourhtml.html", false, System.Text.Encoding.GetEncoding("GB2312"));sw.Write(YourHTMLString);sw.Close(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 what is in your html string? try to view the source in IE string htmlcode = "<html><body>ddddddddddddddd</body></html>";StreamWriter sw = new StreamWriter(@"c:\yourhtml.html", false, System.Text.Encoding.GetEncoding("GB2312"));sw.Write(htmlcode);sw.Close(); 加头部<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> string htmlcode = "<html><meta http-equiv="Content-Type" content="text/html;charset=gb2312"><body>ddddddddddddddd</body></html>";soulroom是这个意思。 我用IE打开,内容如下xhn_21199锛?/FONT>浣犲ソ锛?/FONT> 銆€銆€66666666 銆€銆€銆€銆€銆€銆€銆€銆€鑷?BR>绀硷紒 銆€銆€銆€銆€銆€銆€ 榛勫畻鎴?BR> [email protected] 2003-11-17 ReportViewer和crystal哪个好用些啊?? 水晶报表 --数据源datatable 求高手帮助~~~C#要如何去控制另一个程序的窗体 combobox绑定问题!!!!!!!! 求一个上传文件夹的例子! 这是一段Winform的代码想翻译成Web的 关于Datagridview四问!一问10分 static属性会被垃圾回收吗? 关于多线程的使用!!c# 多线程 删除功能 简单的问题,取值…… 谁能给一个EasyMail.Net Edition? RichTextBox.SelectionColor 怎样控制文本的颜色?
sw.Write(htmlcode);
sw.Close();
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
銆€銆€66666666
銆€銆€銆€銆€銆€銆€銆€銆€鑷?BR>绀硷紒
銆€銆€銆€銆€銆€銆€ 榛勫畻鎴?BR> [email protected]
2003-11-17