易截截图软件、单文件、免安装、纯绿色、仅160KB

C# 写入html 乱码问题 - .NET技术 / C#

string fileName = Request.PhysicalApplicationPath.ToString() + this.filepath.Replace(@"\", @"\\") + @"mm\" + this.ddlType.SelectedValue + ".htm";//路径
  FileInfo info = new FileInfo(fileName);
  if (info.Exists)//修改
  {
  StreamWriter writer = info.CreateText();
  writer.WriteLine(this.txtContent.Text.Trim());
  writer.Close();
  }
  else//不存在时新建
  {
  StreamWriter writer2 = File.CreateText(fileName);
  writer2.WriteLine(this.txtContent.Text.Trim());
  writer2.Close();
  }
  this.Page.RegisterStartupScript("alert", "<script language=javascript>alert('操作完成!');</script>");

最后插入里面中文都是乱码
  我又把上面修改了一下
 string fileName = Request.PhysicalApplicationPath.ToString() + this.filepath.Replace(@"\", @"\\") + @"mm\" + this.ddlType.SelectedValue + ".htm";
  FileInfo info = new FileInfo(fileName);
  if (info.Exists)
  {
  StreamWriter writer = info.CreateText();
  writer.WriteLine(this.txt


相关问答:

VFP如何调用C函数 - 其他数据库开发 / VFP

请问VFP中如何调用C/C++函数?

你要调用什么功能的函数?要看看VFP中有没有对应的函数,如果有就省着再调用了。如果没有,可以将C/C++函数写个DLL或FLL,然后在VFP调用即可。

十豆三 老师,怎么才能修改自己的 ......

sql小小的疑问 - .NET技术 / C#

可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......

遍历一个xml并输出指定节点的值 - .NET技术 / C#

我有一个类似的xml的 string,想通过遍历怎么个xml 输出我想要的element的值
xml 为:
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
  <RequestType>DISCOVER_XML_ME ......

求助:C代码change toVB代码 - VB / 基础类

挺繁琐,之前发的帖子,分值太低现在重发一个。欢迎各位大侠~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号