方法一:
string sPath = System.IO.Path.GetDirectoryName(Page.Request.PhysicalPath)
方法二:
string sPath = System.Web.HttpContext.Current.Request.MapPath("/")
方法三:
string sPath = Page.Server.MapPath("/");
我推荐使用第二种
查看更多关于Asp.net获取当前目录的方法小结的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did28957