Export (0) Print
Expand All

PostBackOptions.AutoPostBack Property

Gets or sets a value that indicates whether the form will automatically post back to the server in response to a user action.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public bool AutoPostBack { get; set; }

Property Value

Type: System.Boolean
true if the form will automatically post back in response to a user action; otherwise, false. The default value is false.

You can use the AutoPostBack property to indicate that a Web Forms page should automatically post back to the server in response to a user action such as selecting an item from a drop-down list. The JavaScript setTimeout method is used with the _doPostBack method to ensure that the user action completes before the postback occurs.

The following code example shows the client-side script that is generated when the AutoPostBack property and the RequiresJavaScriptProtocol property are both set to true.

javascript:setTimeout('__doPostBack('__Page','')', 0)

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft