CheckBox.AutoPostBack Property
Assembly: System.Web (in system.web.dll)
[ThemeableAttribute(false)] public: virtual property bool AutoPostBack { bool get (); void set (bool value); }
/** @property */ public boolean get_AutoPostBack () /** @property */ public void set_AutoPostBack (boolean value)
public function get AutoPostBack () : boolean public function set AutoPostBack (value : boolean)
Not applicable.
Property Value
true to automatically post the state of the CheckBox control to the server when it is clicked; otherwise, false. The default is false.Use this property to specify whether the state of the CheckBox control is posted back to the server when clicked.
Note: |
|---|
| Setting this property to true causes a round trip to the server every time the control is clicked. |
This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and Introduction to ASP.NET Themes.
| Topic | Location |
|---|---|
| How to: Specify Whether ASP.NET Web Server Controls Post to the Server | Building ASP .NET Web Applications |
| How to: Specify Whether ASP.NET Web Server Controls Post to the Server | Building ASP .NET Web Applications |
| Walkthrough: Validating User Input in a Web Forms Page | Building ASP .NET Web Applications in Visual Studio |
The following example demonstrates how to use the AutoPostBack property to automatically post the state of the CheckBox control to the server when the control is clicked.
Note: |
|---|
| The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see ASP.NET Web Page Code Model. |
Note: