Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7195241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:32:21+00:00 2026-05-28T20:32:21+00:00

I have inherited some code using an ASP modal popup extender and for some

  • 0

I have inherited some code using an ASP modal popup extender and for some reason it has now decided to stop working. Am I missing anything here? I’m not too fluent with AJAX / ASP.Net right now so im struggling to diagnose what is going wrong here.

So firstly the javascript method that displays the modal

 function ShowModalRemoveEvent(ID, EventID, InstructorID, InstructorName)
      {
         alert("Hi");
         var modal = $find('ModalPopupExtender1');
         modal.show();
         document.getElementById("txtID").value = ID;
         document.getElementById("txtEventID").value = EventID;
         document.getElementById("txtInstructorID").value = InstructorID;
         document.getElementById("txtInstructorName").value = InstructorName;
      }

I know this is being called because of the alert. So I would assume the prpblem is either in finding the ModalPopupExtender1 or the modal.show() line.

Here is the code for my modal popup extender

 <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
      <ContentTemplate>
         <asp:Panel ID="Panel4" runat="server" Style="display: none" CssClass="ModalBackground">
            <table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
               <tr>
                  <td width="7%" class="cellAlertHeader">
                     <img src="../../../images/Ops/window_delete.png" style="width: 18px; height: 18px" alt=""/>
                  </td>
                  <td width="93%" class="cellAlertHeader">
                     <b>Cancel Instructor Event</b>
                  </td>
               </tr>
            </table>
            <table width="100%">
               <tr>
                  <td width="5%">
                     &nbsp;<td width="95%">
                        &nbsp;
                        <asp:TextBox ID="txtID" Style="display: none" runat="server" CssClass="TextboxTitle"></asp:TextBox>
                        <asp:TextBox ID="txtEventID" Style="display: none" runat="server" CssClass="TextboxTitle"></asp:TextBox>
                     </td>
               </tr>
               <tr>
                  <td width="5%">
                     &nbsp;
                  </td>
                  <td width="95%">
                     <asp:TextBox ID="txtInstructorID" Style="display: none" runat="server" BorderStyle="None"
                        CssClass="TextboxTitle"></asp:TextBox>
                     <asp:TextBox ID="txtInstructorName" Style="font-size: 12px" runat="server" BorderStyle="None"
                        CssClass="TextboxTitle" BorderWidth="0"></asp:TextBox>
                  </td>
               </tr>
               <tr>
                  <td width="5%">
                     &nbsp;
                  </td>
                  <td width="95%">
                     &nbsp;
                  </td>
               </tr>
               <tr>
                  <td width="5%">
                     &nbsp;
                  </td>
                  <td width="95%">
                     <asp:Label ID="Label2" runat="server" Text="Are you sure you want to remove this Event?"
                        CssClass="TextboxTitle"></asp:Label>
                  </td>
               </tr>
               <tr>
                  <td width="5%">
                     &nbsp;
                  </td>
                  <td width="95%">
                     &nbsp;
                  </td>
               </tr>
               <tr>
                  <td width="5%">
                     &nbsp;
                  </td>
                  <td width="95%">
                     <asp:Button ID="ButtonConfirmRemove" runat="server" Text="Confirm" CssClass="buttonshort" />
                     <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" CssClass="buttonshort" />
                  </td>
               </tr>
               <tr>
                  <td width="5%">
                     &nbsp;
                  </td>
                  <td width="95%">
                     &nbsp;
                  </td>
               </tr>
            </table>
         </asp:Panel>
         <asp:Button runat="server" ID="dummyButton" Style="display: none" />
         <cc1:ModalPopupExtender ID="ModalPopupExtender1" 
                                 runat="server" 
                                 PopupControlID="Panel4"
                                 TargetControlID="dummyButton" 
                                 BackgroundCssClass="ModalBGOpacity" 
                                 CancelControlID="ButtonCancel"
                                 OnCancelScript="HideModalPopup()">
         </cc1:ModalPopupExtender>
      </ContentTemplate>
      <Triggers>
         <asp:AsyncPostBackTrigger ControlID="dummyButton" />
      </Triggers>
   </asp:UpdatePanel>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:32:22+00:00Added an answer on May 28, 2026 at 8:32 pm

    Try getting the rendered id of your control, like that.

     var modal = $find('<%=ModalPopupExtender1.CliendID%>');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some C# / asp.net code I inherited which has a textbox which
I have inherited some code that is not working as I think it should:
I have inherited some code: Process p = new ProcessBuilder(/bin/chmod, 777, path).start(); p.waitFor(); Basically,
I have inherited some code (from zip file) from a developer and git initialzed,
I have inherited some HTML code and have been asked to align the two
I have inherited some legacy PHP code what was written back when it was
I have the following code in specman that I inherited: some_method() is { var
I have inherited a middle tier system with some multi-Threading issues. Two different threads,
I have inherited a very old database that needs some data to be updated.
I have inherited a visual studio 2003 project which uses some custom build steps.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.