Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET Button UseSubmitBehavior Property

ASP.NET Button UseSubmitBehavior Property


Button Control Button Control


Definition and Usage

The UseSubmitBehavior property specifies whether the Button control uses the client browser's built-in submit functionality or the ASP.NET postback mechanism.

If the control uses the browser's submit functionality, this property is set to TRUE. Otherwise it is FALSE. The default value is TRUE.

When UseSubmitBehavior is set to FALSE, ASP.NET adds a client-side script to post back the form. The control developer can then use the GetPostBackEventReference method to return the client-side postback event of the Button. The string returned by the GetPostBackEventReference method contains the text of the client-side function call, which can be inserted into a client-side event handler.

Syntax

/>


Example

Example

The following example uses the ASP.NET postback mechanism:

Click the button:

Text="Submit" onclick="SubmitBtn"

UseSubmitBehavior="FALSE" />

Demo Example »


Button Control Button Control