【发布时间】:2012-08-14 05:02:03
【问题描述】:
我正在尝试使用 xmltextwriter 并分配需要用于写入的路径。 我正在尝试这个:
string path = "~/Uploads/site/" + Current.User.Id + .kml";
XmlTextWriter xtr = new XmlTextWriter(path, System.Text.Encoding.UTF8);
我希望将文件保存在网站目录中的 uploads/site/ 文件夹中,但出现错误:
Could not find a part of the path 'c:\windows\system32\inetsrv\~\Uploads\site\16.kml'.
我想知道如何将所需的路径分配给 xmltextwriter。 在此先感谢 Laziale
【问题讨论】:
标签: c# asp.net xml xmltextwriter