Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Why button event not firing in ajax modelpopup extender. Please review the below code
XML
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderLogin" runat="server" BehaviorID="ModalPopupBehavior"
          DropShadow="true" OkControlID="btnok" TargetControlID="lblmsg"  PopupControlID="LoginPanel" />
  <asp:Panel ID="LoginPanel" runat="server" Style="clear: both;" Height="227px" Width="372px">
      <asp:ScriptManager ID="scriptmanager2" runat="server">
      </asp:ScriptManager>

      <table border="0" cellpadding="3" cellspacing="1" width="374px" style="height: 180px;">
          <tr>
              <td style="width: 200px" align="center">
                  <span><b>Old Password:</b></span>
              </td>
              <td style="width: 175px" align="left">
                  <asp:TextBox ID="txtoldpassword" runat="server" TextMode="Password" TabIndex="1"
                      MaxLength="20"  ValidationGroup="ChangePassword" ></asp:TextBox>
              </td>
          </tr>
          <tr>
              <td style="width: 200px" align="center">
                  <span><b>New Password:</b></span>
              </td>
              <td style="width: 175px" align="left">
                  <asp:TextBox ID="txtNewPassword" runat="server" TabIndex="2" TextMode="Password" ValidationGroup="ChangePassword" ></asp:TextBox>
              </td>
          </tr>
          <tr>
              <td style="width: 200px" align="center">
                  <span><b>Confirm New Password:</b></span>
              </td>
              <td style="width: 175px" align="left">
                  <asp:TextBox ID="txtConfirmNewPassword" runat="server" TabIndex="3" TextMode="Password"  ValidationGroup="ChangePassword" ></asp:TextBox>
              </td>
          </tr>
          <tr>
              <td colspan="2" align="center">
                  <asp:Button ID="btnok" runat="server" CausesValidation="false"  Text="OK" OnClick="btnok_Click" ValidationGroup="ChangePassword" />&nbsp;
                  <asp:Button ID="btncancel" runat="server" Text="Cancel" />
              </td>
          </tr>
      </table>
  </asp:Panel>
Posted
Comments
Prasad_Kulkarni 13-Mar-12 2:52am    
check btnok_Click event exists or not

1 solution

Hi there..

Write this code in your @page directive in the top of the page..

HTML
AutoEventWireup="true" 

And
HTML
EnableEventValidation="true"


All the best..
 
Share this answer
 
Comments
Member 8609405 13-Mar-12 3:06am    
i had already try this .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900