Difference between asp:button and html's button

前端 未结 2 1496
暗喜
暗喜 2020-12-19 13:19

I\'m learning asp.net. I have question about example buttons

I can use two types of button.

   

        
2条回答
  •  旧时难觅i
    2020-12-19 13:59

    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.

提交回复
热议问题