2009-01-12 147 views

回答

3
public static string PathMap(string path) 
{ 
    string approot = HttpContext.Current.Request.PhysicalApplicationPath.TrimEnd('\\'); 
    return path.Replace(approot, string.Empty).Replace('\\', '/'); 
} 

来源:http://www.aspapp.com/forums.asp?ForumId=11&TopicId=3536

+0

我需要返回完整的HTTP URL – StoneHeart 2009-01-12 07:43:51