コード例 #1
0
        /// <summary>
        /// Default Constructor
        /// </summary>
        public GenderInputBoxExtender()
        {
            this.EnableClientState = true;
            this.state             = new GenderInputClientState();

            this.ClientStateValuesLoaded += new EventHandler(this.GenderInputBoxExtender_ClientStateValuesLoaded);
        }
コード例 #2
0
        /// <summary>
        /// Handle loading of client state
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">args</param>
        private void GenderInputBoxExtender_ClientStateValuesLoaded(object sender, EventArgs e)
        {
            if (this.ClientState != null)
            {
                JavaScriptSerializer jss = new JavaScriptSerializer();

                // May need to create one...
                // jss.RegisterConverters(new JavaScriptConverter[] { new GenderJavascriptConverter() });

                this.state = jss.Deserialize <GenderInputClientState>(ClientState);
            }
        }