/// <summary> /// Gets the url that corresponds to the content. Inheritors can override this for custom url formatting. /// </summary> public virtual string GetContentUrl() { string defaultUrlFormat = UrlUtil.GetApplicationPath() + "{0}/section.aspx/{1}"; if (this._section == null) { throw new InvalidOperationException("Unable to get the url for the content because the associated section is missing."); } return(String.Format(defaultUrlFormat, this._section.Id, this._id)); }
public override string GetContentUrl() { string defaultUrlFormat = UrlUtil.GetApplicationPath() + "{0}/section.aspx/Download/{1}/{2}"; if (this.Section == null) { throw new InvalidOperationException("Unable to get the url for the content because the associated section is missing."); } return(String.Format(defaultUrlFormat, this.Section.Id, this.Id, this.FileName)); }
protected void Page_Load(object sender, EventArgs e) { if (!(this.Page is PageEngine)) { throw new Exception("The Manager toolbar control needs to be on a Page of type PageEngine to work properly."); } this._pageEngine = (PageEngine)this.Page; this._pageEngine.RegisterStylesheet("managertoolbar", UrlUtil.GetApplicationPath() + "Manager/Content/Css/ManagerToolbar.css"); if (!IsPostBack) { EnableLinks(); } }
/// <summary> /// GetApplicationPath returns the base application path and ensures that it allways ends with a "/". /// </summary> /// <returns></returns> public static string GetApplicationPath() { return(UrlUtil.GetApplicationPath()); }