手机
当前位置:查字典教程网 >编程开发 >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动态载入用户控件的方法

asp.net简化接收参数值的函数

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

asp.net刷新本页面的六种方法

asp.net2.0中css失效的解决方法

asp.net汉字转拼音和获取汉字首字母的代码

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

asp.net导出excel的简单方法

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

Asp.net 5种页面转向方法

精品推荐
分类导航