asp.net Button OnClick event not firing

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

    In the case of nesting the LinkButton within a Repeater you must using something similar to the following:

    LinkButton
    
     protected void Repeater1_OnItemCommand(object source, RepeaterCommandEventArgs e)
     {
        if (e.CommandName.Equals("MyUpdate"))
        {
            // some code
        }
     }
    

提交回复
热议问题