标签:
类中使用ResolveUrl
1>获取当前page然后调用ResolveUrl
System.Web.UI.Page page = HttpContext.Current.CurrentHandler as System.Web.UI.Page; String url=page.ResolveUrl("url");
2>VirtualPathUtility.ToAbsolute
System.Web.VirtualPathUtility.ToAbsolute("~/path")
标签:
原文地址:http://www.cnblogs.com/guohu/p/5000250.html