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

LoadPostData() protected method

protected LoadPostData ( string postDataKey, NameValueCollection postCollection ) : bool
postDataKey string
postCollection NameValueCollection
return bool
		bool LoadPostData (string postDataKey, NameValueCollection postCollection)
		{
#if NET_2_0
			EnsureDataBound ();
#endif
			string [] values = postCollection.GetValues (postDataKey);
			if (values == null || values.Length == 0) {
				int prev_index = SelectedIndex;
				SelectedIndex = -1;
				return (prev_index != -1);
			}
#if NET_2_0
			ValidateEvent (UniqueID, values [0]);
#endif

			if (SelectionMode == ListSelectionMode.Single)
				return SelectSingle (values);
			return SelectMultiple (values);
		}