calling server side event from html button control

后端 未结 6 1590
自闭症患者
自闭症患者 2020-12-13 14:32

I am creating an application using ASP.Net, in which I have a HTML button on an aspx page.



        
6条回答
  •  爱一瞬间的悲伤
    2020-12-13 15:12

    If you are OK with converting the input button to a server side control by specifying runat="server", and you are using asp.net, an option could be using the HtmlButton.OnServerClick property.

    
    

    This should work and call foo_OnClick in your server side code. Also notice that based on Microsoft documentation linked above, you should also be able to use the HTML 4.0 tag.

提交回复
热议问题