TextBox::AutoPostBack Property
Gets or sets a value that indicates whether an automatic postback to the server occurs when the TextBox control loses focus.
Assembly: System.Web (in System.Web.dll)
Use the AutoPostBack property to specify whether an automatic postback to the server will occur when the TextBox control loses focus. Pressing the ENTER or the TAB key while in the TextBox control is the most common way to change focus.
Note |
|---|
If the TextBox control's parent container contains a button marked as the default button (for example, if the container's DefaultButton or DefaultButton property is set), the default button's Click event is not raised in response to the automatic postback. |
This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins.
The following example shows how to use the AutoPostBack property to automatically display the sum of the values entered in the text boxes when the TextBox control loses focus.
Security Note
|
|---|
This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview. |
Available since 1.1

