62,254
社区成员
发帖
与我相关
我的任务
分享
try
{
using (StreamWriter sw = new StreamWriter(dirPath + filename, false, Encoding.UTF8)) //保存地址 filename文件名 如 a.html dirPath路径 如 D://a//a
{
sw.WriteLine(indexlist); //indexlist 内容
sw.Flush();
sw.Close();
}
}
catch (Exception ex)
{
Response.Write("The file could not be wirte:");
}