/// <summary> /// Saves the data-type PreValue options. /// </summary> public override void Save() { // set the options var options = new JD_Options { UrlToJson = this.UrlTextBox.Text, Expression = this.ExpressionTextBox.Text, Key = this.KeyTextBox.Text, Value = this.ValueTextbox.Text }; // save the options as JSON this.SaveAsJson(options); }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Load"/> event. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); // get PreValues, load them into the controls. var options = this.GetPreValueOptions <JD_Options>(); // if the options are null, then load the defaults if (options == null) { options = new JD_Options(true); } // set the values this.UrlTextBox.Text = options.UrlToJson; this.ExpressionTextBox.Text = options.Expression; this.KeyTextBox.Text = options.Key; this.ValueTextbox.Text = options.Value; }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Load"/> event. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); // get PreValues, load them into the controls. var options = this.GetPreValueOptions<JD_Options>(); // if the options are null, then load the defaults if (options == null) { options = new JD_Options(true); } // set the values this.UrlTextBox.Text = options.UrlToJson; this.ExpressionTextBox.Text = options.Expression; this.KeyTextBox.Text = options.Key; this.ValueTextbox.Text = options.Value; }