protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (AllowCollapsing) { //Load the scriptaculous library for the blind effect ScriptaculousManager.Load(Page); JSManager.AddResource(this.Page, typeof(DHtmlCollapsiblePanel), "NCI.Web.UI.WebControls.Resources.DHtmlCollapsiblePanel.js"); Page.RegisterRequiresPostBack(this); } }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); PrototypeManager.Load(this.Page); JSManager.AddResource(this.Page, typeof(DHtmlModalPopup), "NCI.Web.UI.WebControls.Resources.DHtmlModalPopup.js"); //Remove any styles that we do not want! Must be done here because control state gets stored right after prerender. this.Style.Remove(HtmlTextWriterStyle.Display); this.Style.Remove(HtmlTextWriterStyle.Position); this.Style.Remove(HtmlTextWriterStyle.Top); this.Style.Remove(HtmlTextWriterStyle.Left); this.Style.Remove(HtmlTextWriterStyle.ZIndex); //This popup should not show up by default. this.Style.Add(HtmlTextWriterStyle.Display, "none"); }
/// <summary> /// Sets up the prototype library and the javascript on the page. /// </summary> /// <param name="e"></param> protected override void OnPreRender(EventArgs e) { //Do not render this stuff if there are no controls. This avoids unnessasary JS includes //and possible broken JS. if (this.Controls.Count < 1) { this.Visible = false; return; } // Order is important. // The control's JavaScript component relies on Prototype being present first. PrototypeManager.Load(this.Page); JSManager.AddResource(this.Page, typeof(TemplatedTreeView), "NCI.Web.UI.WebControls.Resources.TemplatedTreeView.js"); //string hiddenFieldClientID = this.ClientID + this.ClientIDSeparator + _hiddenFieldId; //string script = "document.getElementById('" + hiddenFieldClientID + "').value = " + this.ClientID + "_obj.getState('" + this.ClientID + "');"; //Page.ClientScript.RegisterOnSubmitStatement(typeof(TemplatedTreeView), hiddenFieldClientID, script); Page.RegisterRequiresPostBack(this); base.OnPreRender(e); }