asp.net.ph

TextBox.AutoPostBack Property

System.Web.UI.WebControls Namespace   TextBox Class


Sets or retrieves a value indicating whether an automatic postback to the server will occur whenever the user changes the content of the text box.

Syntax


Inline <asp:textbox autopostback [ = true | false ] ... >
Script TextBox.AutoPostBack [ = true | false ]

Property Value

This property accepts or returns only a boolean value: true if an automatic postback to the server will occur whenever the user changes the text in the text box; otherwise false. Default value is false.

Remarks

Use the AutoPostBack property to specify whether an automatic postback to the server will occur whenever the user changes the content of the text box.

Note that setting this property to true causes a round trip to the server every time the textbox content is changed. Postback occurs when the user presses the ENTER key or when the text box loses focus after the contents are changed.

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.

Example

The following example demonstrates using AutoPostBack in conjunction with the TextChanged event.

<asp:textbox id = "strSearch" runat = "server" autopostback
   onTextChanged = "getItems" enableviewstate=false />

 Show me 

See Also

TextBox Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph