返回首页

string path=Server.MapPath("../Report/rpt/ReportSchema.xsd");
错误在C#类中Server.MapPath

回答

评论会员:游客 时间:2012/02/07
,请参考下面的链接imgsrc=http://www.orcode.com/img/ico/smiley_smile.gif{A}]
RaviRanjankr:您的问题我有点混淆。请更加清晰,而问的问题,还包括你得到的是什么错误。无论
尝试
{C}

// This will locate the Example.txt file in the root directory.

	// ... This can be used in a file in any directory in the application.



HttpContext.Current.Request.MapPath(" /Example.txt");

参考链接: - {A2的}]:Jitendra Parida1987:嗨,
试试这一个

字符串路径= Server.MapPath("〜/ UploadFiles /"upload_text.txt");
评论会员:游客 时间:2012/02/07
DKNTH:试试这个,而不是{的C4}希望它帮助!有一个微笑{S0的}
amitgajjar
评论会员:游客 时间:2012/02/07
嗨,当您使用相对路径,确保在当前的页面存在目录和要求的报告文件存在。根据上,你需要通过Server.MapPath参数。让我知道如果你需要进一步澄清。感谢。艾米特