Export (0) Print
Expand All

ListBox.LoadPostData Method

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

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

protected virtual bool LoadPostData(
	string postDataKey,
	NameValueCollection postCollection
)

Parameters

postDataKey
Type: System.String

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

postCollection
Type: System.Collections.Specialized.NameValueCollection

A System.Collections.Specialized.NameValueCollection that contains value information indexed by control identifiers.

Return Value

Type: System.Boolean
true if the posted content is different from the last posting; otherwise, false.

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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft