Button UseSubmitBehavior Property
Button Control
Definition and Usage
The UseSubmitBehavior property specifies if the Button control uses the browser's built-in submit function or the ASP.NET postback mechanism.
This property is set to TRUE if the control uses the browser's submit function. FALSE otherwise. Default value is TRUE.
When set to FALSE, ASP.NET adds a client-side script to post the form. This enables control developers to use the GetPostBackEventReference method to return
the client postback event for the Button.
Syntax
| <asp:Button UseSubmitBehavior="TRUE|FALSE" runat="server" /> |
Example
Example
The following example uses the ASP.NET postback mechanism:
<script runat="server">
Sub SubmitBtn(obj As Object, e As EventArgs)
lblMsg.Text = "Submitted using the ASP.NET postback mechanism."
End Sub
</script>
<form runat="server">
Click the button:
<asp:button id="Button1" runat="server"
Text="Submit" onclick="SubmitBtn"
UseSubmitBehavior="FALSE" /><br />
<asp:label id="lblMsg" runat="server"/>
</form>
|
Show example »
|
Button Control
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
 |
W3Schools' Online Certification Program
The perfect solution for professionals who need to balance work, family, and career building.
More than 4500 certificates already issued!
|
The HTML Certificate documents your knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
|