this.Parent.Parent.Page.AppRelativeVirtualPath gives the URL
another way is:
public static string GetLocalPath
{
get
{
string path = "~" + HttpContext.Current.Request.Url.LocalPath;
path = path.ToLower();
return path
}
This query can be placed in Global.asax.cs and can be used by both the UserControl and any page.
No comments:
Post a Comment