System.Web.UI.WebControls.CheckBox.LoadPostData C# (CSharp) Method

LoadPostData() protected method

protected LoadPostData ( string postDataKey, NameValueCollection postCollection ) : bool
postDataKey string
postCollection System.Collections.Specialized.NameValueCollection
return bool
		bool LoadPostData (string postDataKey, NameValueCollection postCollection)
		{
			if (!IsEnabled)
				return false;

			string postedValue = postCollection[postDataKey];
			bool postedBool = ((postedValue != null) &&
					   (postedValue.Length > 0));
			
			if (Checked != postedBool) {
				Checked = postedBool;
				return (true);
			}

			return (false);
		}