ASP.NET AutoPostBack Property

Definition and Usage

The AutoPostBack property is used to set or return whether an automatic posting operation to the server occurs when the user presses the Enter or Tab key in the TextBox control.

If this property is set to TRUE, automatic posting is enabled; otherwise, it is FALSE. The default is FALSE.

Syntax

<asp:TextBox AutoPostBack="TRUE|FALSE" runat="server"/>

Example

The following example sets the AutoPostBack mode to "TRUE":

<form runat="server">
<asp:TextBox id="tb1" runat="server" AutoPostBack="TRUE" />
</form>

Example

Set the AutoPostBack property of the TextBox control to TRUE