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

  • Home
  • SEARCH
  • 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 8726171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:11:47+00:00 2026-06-13T08:11:47+00:00

I have a modal popup extender which fires on a button click … now

  • 0

I have a modal popup extender which fires on a button click … now irrespective on the onclientclick function return value true/false its always poping up. I need to stop the modal to fire on return of false and modal to fire the return to true..how to do this?

Please find the code below :

<div style="text-align:center;" runat="server" id="pnlButton">          
    <asp:Button  CssClass="button" ID="btnBack" runat="server" Text="Back" 
        Width="120px" onclick="btnBack_Click" UseSubmitBehavior="false" />
    &nbsp;
    <asp:Button  CssClass="button" ID="btnCancel" runat="server" 
            Text="Cancel Request" Width="130px" onclick="btnCancel_Click" onClientClick="Validate();" />
</div>
<div style="text-align:center;">
<asp:Button  CssClass="button" ID="btnDone" Visible="false" runat="server" 
        Text="Done" Width="110px" onclick="btnDone_Click"   />
</div>

<ajaxToolkit:ConfirmButtonExtender ID="cbe" runat="server"
TargetControlID="btnCancel"
DisplayModalPopupID="ModalPopupExtender1"
ConfirmText="Are you sure you want to click this?" />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnCancel"
PopupControlID="PNL" OkControlID="ButtonOk" CancelControlID="ButtonCancel" BackgroundCssClass="modalBackground" />
<asp:Panel ID="PNL" runat="server" Style="display: none; width: 400px; background-color: White;
    border-width: 2px; border-color: Black; border-style: solid; padding: 20px;">
    <h2>Are you sure you want to cancel this request?</h2>
    <br />
    <br />
    <div style="text-align: right;">
        <asp:Button ID="ButtonOk" runat="server" Text="Yes" CssClass="button" />&nbsp;&nbsp;
        <asp:Button ID="ButtonCancel" runat="server" Text="No" CssClass="button" />
    </div>
</asp:Panel>
  • 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-06-13T08:11:49+00:00Added an answer on June 13, 2026 at 8:11 am

    You can open Popup from javascript

    function ValidateAndOpen(){
    if(Validate()){
    var modalDialog = $find("ModalPopupExtender1"); 
    // get reference to modal popup using the AJAX api $find() function    
      if (modalDialog != null) {
        modalDialog.show();
      }    
     }
    return false;
    }
    

    You must set ClientIDMode=”Static” on ModalPopupExtender
    and set OnClientClick=”return ValidateAndOpen();”

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

Sidebar

Related Questions

I have an ajax modal popup, which is shown on click of a button
I have a modal popup extender which is triggered by gridview onRowCommand. The gridview
Problem here is, i have a Modal PopUp Extender inside a User Control, which
I have a modal popup extender tied to a asp:panel control that I want
Hi all I have a modal popup extender set to a hidden linkbutton. So
I have inherited some code using an ASP modal popup extender and for some
I have a Modal Popup Extender(MPE) , it has textboxes that are build dynamically
I have a modal popup with several links inside that have the :confirm and
In an asp.net web application, I have a modal popup built with a Telerik
I have a gridview that is only shown in a modal popup. right before

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.