System.Web.UI.WebControls.CheckBoxList.LoadPostData Method

Processes the posted data for the System.Web.UI.WebControls.CheckBoxList control.

Syntax

protected virtual bool LoadPostData (string postDataKey, System.Collections.Specialized.NameValueCollection postCollection)

Parameters

postDataKey
The key identifier for the control, used to index the System.Collections.Specialized.NameValueCollection specified in the postCollection parameter.
postCollection
A System.Collections.Specialized.NameValueCollection that contains value information indexed by control identifiers.

Returns

true if the state of the System.Web.UI.WebControls.CheckBoxList is different from the last posting; otherwise, false.

Remarks

The CheckBoxList.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method is used primarily by control developers in custom controls that derive from the System.Web.UI.WebControls.CheckBoxList class.

The CheckBoxList.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method indicates whether the state of the System.Web.UI.WebControls.CheckBoxList control has changed. In other words, it determines whether each list item in the control has the same ListItem.Selected value as the last posted value. A user selecting or clearing an item in the control changes the ListItem.Selected property value for the corresponding System.Web.UI.WebControls.ListItem object in the ListControl.Items collection of the System.Web.UI.WebControls.CheckBoxList control. If the same list items are selected in the control, or if the System.Web.UI.WebControls.CheckBoxList is disabled, CheckBoxList.LoadPostData(string, System.Collections.Specialized.NameValueCollection) returns false.

When the CheckBoxList.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method returns true for a control, the page framework invokes the CheckBoxList.RaisePostDataChangedEvent method for the control.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0