I'm learning asp.net. I have question about example buttons
I can use two types of button.
<input id="Button1" type="button" value="button" />
or
<asp:Button ID="Button3" runat="server" Text="Button" />
What are the main differences between the two?
One is a server control (the asp button) that when rendered on the page includes javascript that handles the postback logic, as well as being exposed to your code-behinds as a control you can address by its ID. The Html control is platform agnostic, and is rendered by your browser as just a button. That button will raise click events but will not POST your form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With