ASP.NET postback with jQuery?

前端 未结 6 1595
深忆病人
深忆病人 2020-12-13 21:19

I have a ASP.NET button but recently, I replaced it with a standard HTML button ... What I need to do is a postback to an ASP.NET page and ensure a method is called.

6条回答
  •  长情又很酷
    2020-12-13 21:31

    You should be able to stop the postback with whatever JS is attached to the button onclick event, regardless of whether it is a WebControl or a standar HTML button, by returning false.

    E.g.

提交回复
热议问题