protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); //Resize the height of the pop-up on submit, if it is the case if (!ClientScript.IsOnSubmitStatementRegistered(this.Page.GetType(), "ResizePopUp")) { ClientScript.RegisterOnSubmitStatement(this.Page.GetType(), "ResizePopUp", "SetPopUpHeight();"); } //Get the bool value indicating if the page is opened from user settings page or not bool isFromUserSettings = String.IsNullOrEmpty(HttpContext.Current.Request.QueryString["UserSettings"]) ? false : true; if (!isFromUserSettings) { //Hide the cancel button if not coming from user settings btnCancel.Visible = false; } }
protected override void OnPreRender(EventArgs e) { try { base.OnPreRender(e); if (!ClientScript.IsOnSubmitStatementRegistered(this.Page.GetType(), "ResizePopUp")) { ClientScript.RegisterOnSubmitStatement(this.Page.GetType(), "ResizePopUp", "SetPopUpHeight(); if(Page_IsValid) this.disabled=true;"); } } catch (IndException ex) { ShowError(ex); return; } catch (Exception ex) { ShowError(new IndException(ex)); return; } }
protected override void OnPreRender(EventArgs e) { try { base.OnPreRender(e); //Set the ValueToCompare property of the compare validators in the page depending on the current values of costs SetCompareValidatorsValues(); if (!ClientScript.IsOnSubmitStatementRegistered(this.GetType(), "ResizePopUp")) { ClientScript.RegisterOnSubmitStatement(this.GetType(), "ResizePopUp", "SetPopUpHeight(); if(Page_IsValid) this.disabled=true;"); } } catch (IndException exc) { ShowError(exc); return; } catch (Exception exc) { ShowError(new IndException(exc)); return; } }