asp.net Button OnClick event not firing

前端 未结 15 1679
闹比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:18

    If you are using updatepanel on onclick event, this may happen.

    Use 'EnableEventValidation="false"' in your page markup like this :

    <%@ Page Language="C#" MasterPageFile="~/ars_home.master" AutoEventWireup="true" CodeFile="Transaction_Window.aspx.cs" Inherits="Transaction_Window" EnableEventValidation="false" %>
    

    Hope this helps

提交回复
热议问题