Edit

Kongsi melalui


ListBox.LoadPostData(String, NameValueCollection) Method

Definition

Loads the posted content of the list control, if it is different from the last posting.

protected:
 virtual bool LoadPostData(System::String ^ postDataKey, System::Collections::Specialized::NameValueCollection ^ postCollection);
protected virtual bool LoadPostData (string postDataKey, System.Collections.Specialized.NameValueCollection postCollection);
abstract member LoadPostData : string * System.Collections.Specialized.NameValueCollection -> bool
override this.LoadPostData : string * System.Collections.Specialized.NameValueCollection -> bool
Protected Overridable Function LoadPostData (postDataKey As String, postCollection As NameValueCollection) As Boolean

Parameters

postDataKey
String

The key identifier for the control, used to index the postCollection.

postCollection
NameValueCollection

A NameValueCollection that contains value information indexed by control identifiers.

Returns

true if the posted content is different from the last posting; otherwise, false.

Remarks

The LoadPostData method is used primarily by control developers, when deriving a custom control from the ListBox class.

The LoadPostData method indicates if the state of the ListBox control has changed. In other words, it determines if each list item in the control has the same Selected value as the last posted value. A user selecting an item in the control changes the Selected value for the corresponding ListItem object in the Items collection of the ListBox control. If some list items are selected in the control, or if the ListBox is disabled, LoadPostData returns false.

When the LoadPostData method returns true for a control, the ASP.NET page framework invokes the RaisePostDataChangedEvent method for the control.

Applies to

See also