Raises the CheckBox.CheckedChanged event of the System.Web.UI.WebControls.CheckBox control. This allows you to handle the event directly.
- e
- A EventArgs that contains the event data.
The CheckBox.CheckedChanged event is raised when the value of the CheckBox.Checked property changes between posts to the server.
A System.Web.UI.WebControls.CheckBox control must persist some values between posts to the server for this event to work correctly. Be sure that view state is enabled for this control.
Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application
The CheckBox.OnCheckedChanged(EventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.