1
2
3
4
5
6
7
8
9
10
11
12
13
|
public string MapUrl(string path)
{
if (!string.IsNullOrEmpty(path))
{
string TmpPath = System.Web.HttpContext.Current.Server.MapPath("~");
string url = string.Format("{0}", System.Web.HttpContext.Current.Request.ApplicationPath + path.Replace(TmpPath, "").Replace("\\", "//"));
return url;
}
else
{
return string.Empty;
}
}
|