/// <summary> /// Default Constructor /// </summary> public TelephoneInputBoxExtender() { this.EnableClientState = true; this.state = new TelephoneInputClientState(); this.ClientStateValuesLoaded += new EventHandler(this.TelephoneInputBoxExtender_ClientStateValuesLoaded); }
/// <summary> /// Handle loading of client state /// </summary> /// <param name="sender">sender</param> /// <param name="e">args</param> private void TelephoneInputBoxExtender_ClientStateValuesLoaded(object sender, EventArgs e) { if (this.ClientState != null) { JavaScriptSerializer jss = new JavaScriptSerializer(); // May need to create one... // jss.RegisterConverters(new JavaScriptConverter[] { new TelephoneJavascriptConverter() }); this.state = jss.Deserialize <TelephoneInputClientState>(ClientState); // this.value = this.state.Value; } }
/// <summary> /// Handle loading of client state /// </summary> /// <param name="sender">sender</param> /// <param name="e">args</param> private void TelephoneInputBoxExtender_ClientStateValuesLoaded(object sender, EventArgs e) { if (this.ClientState != null) { JavaScriptSerializer jss = new JavaScriptSerializer(); // May need to create one... // jss.RegisterConverters(new JavaScriptConverter[] { new TelephoneJavascriptConverter() }); this.state = jss.Deserialize<TelephoneInputClientState>(ClientState); // this.value = this.state.Value; } }