System.Web.UI.HtmlControls.HtmlSelect.LoadPostData Method

Processes the postback data for the System.Web.UI.HtmlControls.HtmlSelect control.

Syntax

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

Parameters

postDataKey
The key identifier for the control.
postCollection
The collection of all incoming name values.

Returns

true if the System.Web.UI.HtmlControls.HtmlSelect control's state has changed as a result of a postback; otherwise, false.

Remarks

The HtmlSelect.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method checks whether the postback data of the System.Web.UI.HtmlControls.HtmlSelect control is different from its previous value, and if so, returns true. If the System.Web.UI.HtmlControls.HtmlSelect control's HtmlSelect.Multiple property is false, indicating a single-selection System.Web.UI.HtmlControls.HtmlSelect control, then the HtmlSelect.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method checks the HtmlSelect.SelectedIndex property. If the System.Web.UI.HtmlControls.HtmlSelect control's HtmlSelect.Multiple property is true, indicating a multiple-selection System.Web.UI.HtmlControls.HtmlSelect control, then the HtmlSelect.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method checks the HtmlSelect.SelectedIndices property.

The HtmlSelect.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method is used primarily by control developers extending the functionality of the System.Web.UI.HtmlControls.HtmlSelect control.

Requirements

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