/// <summary> /// Saves the data-type PreValue options. /// </summary> public override void Save() { // set the options var options = new AS3U_Options() { AccessKey = this.txtAccessKey.Text, SecretKey = this.txtSecretKey.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<AS3U_Options>(); // if the options are null, then load the defaults if (options == null) { options = new AS3U_Options(true); } // set the values this.txtAccessKey.Text = options.AccessKey; this.txtSecretKey.Text = options.SecretKey; }