/// <summary> /// Saves the data-type PreValue options. /// </summary> public override void Save() { // set the options var options = new AU_Options() { AccountName = this.txtAccountName.Text, Key = this.txtKey.Text }; // save the options as JSON this.SaveAsJson(options); }
/// <summary> /// Saves the data-type PreValue options. /// </summary> public override void Save() { // set the options var options = new AU_Options() { AccountName = this.txtAccountName.Text, Key = this.txtKey.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 <AU_Options>(); // if the options are null, then load the defaults if (options == null) { options = new AU_Options(true); } // set the values this.txtAccountName.Text = options.AccountName; this.txtKey.Text = options.Key; }
/// <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<AU_Options>(); // if the options are null, then load the defaults if (options == null) { options = new AU_Options(true); } // set the values this.txtAccountName.Text = options.AccountName; this.txtKey.Text = options.Key; }