Partager via


AUTOPOSTBACK Attribute | AutoPostBack Property

Sets or retrieves a value that indicates whether the control posts back to the server each time a user interacts with the control.

Syntax

Visual Basic Overridable  Public  Property AutoPostBack As bool
C# public   virtual  bool AutoPostBack { get; set; }
Managed C++ public:  __property virtual bool get_AutoPostBack();
public:  __property virtual  void set_AutoPostBack(bool);
JScript public   function get AutoPostBack() : bool;
public   function set AutoPostBack(bool);

Possible Values

bAutoPostBack bool that specifies or receives a value that indicates whether the control posts back to the server each time a user interacts with the control.
falseDefault. The control does not post back to the server until the form is submitted.
trueThe control posts back to the server with each user interaction.

The property is read/write. The property has a default value of false.

Remarks

For most Windows Internet Explorer WebControls, when AutoPostBack is false. Only the events from actions that cause a net change in the state of the control are submitted to the server.

When AutoPostBack is true, users may experience different behavior on the ToolbarTextBox between uplevel and downlevel browsers. For uplevel browsers, pressing the ENTER key or the ToolbarTextBox, losing focus, causes a postback. Whether a postback occurs in these instances varies in downlevel browsers depending on the browser. With WebControls, an uplevel browser is Microsoft Internet Explorer 5.5 or later. A downlevel browser is Internet Explorer 5.01 or earlier or a browser other than Internet Explorer.

Applies To

TOOLBARDROPDOWNLIST, TOOLBARTEXTBOX

See Also

Internet Explorer WebControls, About the Toolbar WebControl