ASP.NET Button UseSubmitBehavior
Property
Definition and Usage
The UseSubmitBehavior
property specifies whether the Button control uses the built-in submit functionality of the client browser or the ASP.NET postback mechanism.
If the control uses the browser's submit functionality, this property is set to TRUE. Otherwise, it is set to FALSE. The default value is TRUE.
When UseSubmitBehavior
is set to FALSE, ASP.NET adds a piece of client-side script to post back the form. At this point, control developers can use the GetPostBackEventReference
method to return the client-side postback event for the Button. The string returned by the GetPostBackEventReference
method contains the text of the client function call and can be inserted into the client event handler.
Syntax
Example
Example
The following example uses the ASP.NET postback mechanism: