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 923137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:08:46+00:00 2026-05-15T19:08:46+00:00

I have this page where in i have a ModalPopupExtender. Now the panel that

  • 0

I have this page where in i have a ModalPopupExtender. Now the panel that shows up as a ModalPopup has 2 buttons namely “Invite” and “Cancel”. My problem is that when i click on either of the buttons postback does not occur and i am unable to run my server side code.

When i click on the “Invite” button it simply hides the ModalPopupExtender control and does nothing!!

    <asp:ModalPopupExtender ID="mpeInviteFriend" runat="server"
  TargetControlID="lbInvite" PopupControlID="pnlInviteFriend"
  OkControlID="btnInvite" CancelControlID="btnCancel"
  BackgroundCssClass="diabledBackground" Y="100"></asp:ModalPopupExtender>

 <asp:Panel ID="pnlInviteFriend" runat="server">
  <div class="popUpBoxBackground" style="height:230px; width: 400px">
   <div class="popUpBox">
    <div class="popUpHeader">
     <b>Invite a Friend</b>
    </div>
    <div class="popUpBody" style="height:210px">
     <div style="padding: 10px">
      <table cellpadding="0" cellspacing="0" border="0" width="100%">
       <tr>
        <td>You have chosen to invite your friend to join this community.</td>
       </tr>
       <tr>
        <td style="padding: 8px 0px 0px 0px">Email address of your friend:</td>
       </tr>
       <tr>
        <td style="padding: 4px 0px 5px 0px" align="right">
         <asp:TextBox ID="TextBox1" runat="server" 
          TextMode="MultiLine" CssClass="inputTextbox"
          Width="99%" Height="28px"></asp:TextBox>
         <span class="smallInfoText" style="color: #000">In case you want to invite more than 1 friend, separate their mail id with a ;</span>
        </td>
       </tr>
       <tr>
        <td style="padding: 4px 0px 0px 0px">Would you like to add a personal note?</td>
       </tr>
       <tr>
        <td style="padding: 4px 0px 5px 0px" align="right">
         <asp:TextBox ID="txtInvitationText" runat="server" 
          TextMode="MultiLine" CssClass="inputTextbox"
          Width="99%"></asp:TextBox>
         <span class="smallInfoText" style="color: #000">If not then leave it blank and we will take care of the note : )</span>
        </td>
       </tr>
       <tr>
        <td align="right">
         <asp:Button ID="btnInvite" runat="server" OnClick="btnInvite_Click" Text="Invite" style="margin-right: 10px" Width="60px" />
         <asp:Button ID="btnCancel" runat="server" OnClick="btnCancel_Click" Text="Cancel" Width="60px" />
        </td>
       </tr>
      </table>
     </div>
    </div>
   </div>
  </div>
 </asp:Panel>

Please help.

Thank you.

  • 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-15T19:08:46+00:00Added an answer on May 15, 2026 at 7:08 pm

    Take out this part of your markup:

    OkControlID="btnInvite" CancelControlID="btnCancel"
    

    Update after comment:

    In the initialization phase, client side, this piece of code gets executed:

        if (this._OkControlID) {
            this._okHandler = Function.createDelegate(this, this._onOk);
            $addHandler($get(this._OkControlID), 'click', this._okHandler);
        }
    

    So basically it creates a handler towards the _onOK function:

    _onOk: function(e) {
        /// <summary>
        /// Handler for the modal dialog's OK button click
        /// </summary>
        /// <param name="e" type="Sys.UI.DomEvent">
        /// Event info
        /// </param>
    
        var element = $get(this._OkControlID);
        if (element && !element.disabled) {
            if (this.hide() && this._OnOkScript) {
                window.setTimeout(this._OnOkScript, 0);
            }
            e.preventDefault();
            return false;
        }
    },
    

    as you can see it calls e.preventDefault(); which causes the normal behavior of the OKControl to not go through while this.hide() will close the modal popup itself.

    I suggest you read the ModalPopupBehavior.debug.js from the control toolkit if you want to know more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this page that has a JS error about the YUI JavaScript library
I have this page that does some funky database stuff that takes a couple
I have this page, shown below. In the ASCX file, the data is generated
I have this page and if you view the net tab in firebug you
I have this page and if you look at the top right search...i need
I have this PAGE and I have if you scroll down the map to
I have this page, which works fine in every other browser than IE: http://www.portable-shade.com/products.html
I have this page and I am trying to link to the /our-other-brands page
I have searched for most of the day for an answer to this but
this is aspx page code ' OnClick=lnkCustomer> SelectCommand=SELECT DISTINCT [firstname], [middlename], [lastname], [mobile], [city],

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.