标签:
public string GetUrl_Path()
{
string url = "http://" + HttpContext.Current.Request.Url.Host;
string url_sub = HttpContext.Current.Request.ApplicationPath;
if (url_sub == "/") { url_sub = ""; }
url = url + url_sub;
return url;
}
虚拟路径: theUrl = geturl.GetUrl_Path() + "/WorkData/Pgbg_Doc/" + this.Hd_dtmc.Value;
与该虚拟路径相对应的物理路径:
theURL = HttpContext.Current.Server.MapPath("../WorkData/Pgbg_Doc/") + this.Hd_dtmc.Value;
标签:
原文地址:http://www.cnblogs.com/fkcxy/p/5801655.html