1

I want to create a simple Yes/No popup window. So I have added a ModalPopupExtender to the .aspx page.

The popup panel's markup is:

<asp:Button ID="btn_yes" runat="server" Text="Yes" onclick="btn_yes_Click" />
  <br/>
  <br/>
<asp:Button ID="btn_no" runat="server" Text="No" />

For some reason, I cannot get into the function btn_yes_Click, not sure why. Do I have to use Javascript?

Frédéric Hamidi
  • 258,201
  • 41
  • 486
  • 479
user1889838
  • 325
  • 4
  • 13
  • 37

2 Answers2

2

I suspect that you are also setting the ModalPopupExtenders OkControlID property to "btn_yes". As you can see in this related question this will cause the OnClick event not to fire.

Community
  • 1
  • 1
matei.navidad
  • 676
  • 6
  • 18
0

There is a chance that the OKControlID Property on ModalPopupExtender tag is specified. Take a look at this topic: The Event Handler of the OK button inside a Modal PopUp is not executing

Community
  • 1
  • 1
Asimov
  • 65
  • 7