System.Web.UI.WebControls.CheckBoxList.RaisePostDataChangedEvent Method

Notifies the ASP.NET application that the state of the System.Web.UI.WebControls.CheckBoxList control has changed.

Syntax

protected virtual void RaisePostDataChangedEvent ()

Remarks

The CheckBoxList.RaisePostDataChangedEvent method is used primarily by control developers in custom controls that derive from the System.Web.UI.WebControls.CheckBoxList class.

The page framework calls the CheckBoxList.RaisePostDataChangedEvent method on a System.Web.UI.WebControls.CheckBoxList control when the CheckBoxList.LoadPostData(string, System.Collections.Specialized.NameValueCollection) method indicates that the state of the list items have changed in the System.Web.UI.WebControls.CheckBoxList control. The CheckBoxList.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 or clears list items in the control.

The System.Web.UI.IPostBackDataHandler.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.CheckBoxList is selected, set the ListControl.AutoPostBack and ListControl.CausesValidation properties to true, and 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