asp.net Button OnClick event not firing

前端 未结 15 1717
闹比i
闹比i 2020-11-30 05:43

I have problem in asp.net button control.

I define a button in form, onclick event of button is not firing when I click on the button.

&         


        
15条回答
  •  臣服心动
    2020-11-30 06:13

    Because your button is in control it could be that there is a validation from another control that don't allow the button to submit. The result in my case was to add CausesValidation property to the button:

     
    

提交回复
热议问题