System.Web.UI.WebControls.ListBox.RaisePostDataChangedEvent Method

Invokes the ListControl.OnSelectedIndexChanged(EventArgs) method whenever posted data for the System.Web.UI.WebControls.ListBox control has changed.

Syntax

protected virtual void RaisePostDataChangedEvent ()

Remarks

The ListBox.RaisePostDataChangedEvent method is used primarily by control developers, when deriving a custom control from the System.Web.UI.WebControls.ListBox control.

The ASP.NET page framework calls the ListBox.RaisePostDataChangedEvent method on a System.Web.UI.WebControls.ListBox control when the ListBox.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method indicates that the state of the list items have changed in the System.Web.UI.WebControls.ListBox control. The ListBox.RaisePostDataChangedEvent method calls the ListControl.OnSelectedIndexChanged(EventArgs) method to raise the ListControl.SelectedIndexChanged event. Control developers can override the ListControl.OnSelectedIndexChanged(EventArgs) method to perform custom processing when the user selects list items in the control.

The ListBox.RaisePostDataChangedEvent method can optionally perform validation before raising the ListControl.SelectedIndexChanged event for the control. To validate a group of controls on the page when a list item within the System.Web.UI.WebControls.ListBox is selected, set the ListControl.AutoPostBack and ListControl.CausesValidation properties to true, and then specify the group of controls to validate in the ListControl.ValidationGroup property.

Requirements

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