If you do not want the button to be sent, do you need a button at all? In the end, he does nothing until he returns to the server. You can also use <input type="button" .
As the saying goes, you can use javascript to prevent postback:
<asp:Button runat="server" OnClientClick="return false;" />
driis
source share