Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.net button without submit

Tags:

asp.net

Is there ASP button that won't submit post form data.

Whenever I click an asp button it post form data and I want to change that behavior so I can post some other form data I will create it programmatically.

like image 360
Pinchy Avatar asked Apr 09 '12 11:04

Pinchy


1 Answers

Using the attribute UseSubmitBehaviour="false" solved my problem

<asp:Button ID="button1" runat="server" UseSubmitBehavior="false" Text="just a button" />

This attribute is available since .Net v2.0, for more information: Button.UseSubmitBehavior Property

like image 53
Imran Rafique Avatar answered Nov 15 '22 10:11

Imran Rafique