protected string ResolveUrl() { string url = ResourceHandler.GetResourceUrl(this.BuildResult, this.SourceUrl, this.IsDebug); if (url != null && url.StartsWith("~/")) { // resolve app relative URLs if (HttpRuntime.AppDomainAppVirtualPath.Length > 1) { url = HttpRuntime.AppDomainAppVirtualPath + url.TrimStart('~'); } else { url = url.TrimStart('~'); } } return(url); }