您的位置:首页 > 编程语言 > ASP

ASP.NET根路径的获取和将Web站点下的绝对路径转换为虚拟路径的两种方案

2012-11-30 09:21 519 查看
HttpContext.Current.Request.ApplicationPath web 应用的名称

HttpContext.Current.Server.MapPath(".").ToLower();//当前服务器上文件路径的绝对路径(这里MapPath里的"."代表当前服务器)

HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath).ToLower();//当前的绝对路径
http://www.cnblogs.com/JuneZhang/archive/2010/11/23/1885671.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: