/// <summary> /// Default constructor /// </summary> public TimeInputBoxExtender() { this.EnableClientState = true; this.NullStrings = new string[0]; this.state = new TimeInputClientState(); this.ClientStateValuesLoaded += new EventHandler(this.ExtenderClientStateLoaded); }
/// <summary> /// Handle loading of client state /// </summary> /// <param name="sender">sender</param> /// <param name="e">args</param> private void ExtenderClientStateLoaded(object sender, EventArgs e) { if (this.ClientState != null) { JavaScriptSerializer jss = new JavaScriptSerializer(); jss.RegisterConverters(new JavaScriptConverter[] { new NhsTimeJavascriptConverter() }); this.state = jss.Deserialize <TimeInputClientState>(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 ExtenderClientStateLoaded(object sender, EventArgs e) { if (this.ClientState != null) { JavaScriptSerializer jss = new JavaScriptSerializer(); jss.RegisterConverters(new JavaScriptConverter[] { new NhsTimeJavascriptConverter() }); this.state = jss.Deserialize<TimeInputClientState>(ClientState); this.value = this.state.Value; } }