一个关于xml文件操作的问题![两天内结贴] 请问,怎样用C#代码来删除一个存在于服务器端的xml文件! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 File.Delete 方法删除指定的文件。如果指定的文件不存在,则不引发异常。File.Delete(Server.MapPath(strPath)); string path="your xml file path";if (File.Exist(path)){ File.Delete(path)} string filepath = Server.MapPath(filename)File.Delete(filepath);注意要给你删除的文件修改一下权限 string filepath = Server.MapPath(filename)File.Delete(filepath);注意要给你删除的文件修改一下权限 using System.IO;string FilePath="..\\XXX.xml"File.Delete(Server.MapPath(FilePath));注意文件权限 c# winform 程序里如何转换html编码. radiobuttonlist 和 radiobutton 电脑上的项目 都报错了 asp.net的发布问题 __asp.net2.0 treeview控件我加了NavigateUrl后,样式怎么不管用了阿!急!??~~~~~~~~ 做新闻发布模块遇到的困惑 关于播放器生成播放列表 vb和c#能同时使用吗 线程问题 求解 如何在客户端连数据库? 水晶报表生成后导出成word形式,大家来看看 非技术问题,请各位留下宝贵意见!
删除指定的文件。如果指定的文件不存在,则不引发异常。File.Delete(Server.MapPath(strPath));
{
File.Delete(path)
}
File.Delete(filepath);
注意要给你删除的文件修改一下权限
File.Delete(filepath);
注意要给你删除的文件修改一下权限
File.Delete(Server.MapPath(FilePath));注意文件权限