Adding OnClick event to ASP.NET control

前端 未结 3 2075
温柔的废话
温柔的废话 2021-01-15 08:06

i would like to create OnClick event for my panel. So far now the most of the google results look more or less like this: adding onclick event to a

3条回答
  •  -上瘾入骨i
    2021-01-15 08:12

    In your java script method raise a __dopostback call to a Server side method.

    
    

    Where btnTemp is a server side button, so write a onClick event of this button on server side, where you can do the processing and then redirect to other page.

    You can have a good understanding of dopostback at DoPostBack Understanding

提交回复
热议问题