/// <summary> /// Register a CSS block in the page header. /// </summary> /// <param name="name"> /// Unique name of the CSS block /// </param> /// <param name="cssContents"> /// CSS contents /// </param> public void RegisterCssBlock(string name, string cssContents) { this.RegisterCssBlock( YafContext.Current.CurrentForumPage.TopPageControl, name, JsAndCssHelper.CompressCss(cssContents)); }
/// <summary> /// Registers a Javascript block using the script manager. Adds script tags. /// </summary> /// <param name="thisControl"> /// The this Control. /// </param> /// <param name="name"> /// The name. /// </param> /// <param name="script"> /// The script. /// </param> public void RegisterJsBlockStartup(Control thisControl, string name, string script) { if (!this.PageElementExists(name)) { ScriptManager.RegisterStartupScript( thisControl, thisControl.GetType(), name, JsAndCssHelper.CompressJavaScript(script), true); } }