手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >Asp.net获取当前目录的方法小结
Asp.net获取当前目录的方法小结
摘要:方法一:stringsPath=System.IO.Path.GetDirectoryName(Page.Request.PhysicalP...

方法一:

string sPath = System.IO.Path.GetDirectoryName(Page.Request.PhysicalPath)

方法二:

string sPath = System.Web.HttpContext.Current.Request.MapPath("/")

方法三:

string sPath = Page.Server.MapPath("/");

我推荐使用第二种

【Asp.net获取当前目录的方法小结】相关文章:

asp.net GridView 中增加记录的方法

asp.net下获取Excel所有的工作表名称

ASP.NET中实现获取调用方法名

.net开发人员常犯的错误分析小结

asp.net字符串分割函数使用方法分享

ASP.NET 重定向的几种方法小结

asp.net注册Javascript的方法

asp.net动态载入用户控件的方法

asp.net 因为数据库正在使用的解决方法

asp.net C#检查URL是否有效的方法

精品推荐
分类导航