手机
当前位置:查字典教程网 >编程开发 >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 C#检查URL是否有效的方法

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

asp.net Ajax 安装与卸载方法

Asp.NET调用百度翻译的方法

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

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

在asp.net下实现Option条目中填充前导空格的方法

ASP.NET连接MySql数据库的2个方法及示例

ASP.NET使用gridview获取当前行的索引值

Asp.net清空cache禁用页面缓存的方法

精品推荐
分类导航