System.Web.UI.WebControls Namespace CheckBox Class
Sets or retrieves a value indicating whether the CheckBox automatically posts back to the server when clicked.
Inline |
<asp:checkbox autopostback [ = true | false ] ... > |
Script |
CheckBox.AutoPostBack [ = true | false ] |
This property accepts or returns only a boolean value: true to automatically post the state of the checkbox to the server when clicked; otherwise false. Default value is false.
Use the AutoPostBack property to specify whether the state of the CheckBox is posted automatically back to the server when the control is clicked.
Note that setting this property to true causes a round trip to the server every time the control is clicked.
IMPORTANT: AutoPostBack requires that the user's browser be set to allow scripting. While this is the default in most cases, some users may have scripting disabled for security reasons.
The following examples demonstrate using the AutoPostBack property of CheckBox controls in different scenarios.
CheckBox Members