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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:21:02+00:00 2026-05-20T21:21:02+00:00

I have a page which has a modal pop up which shows on clicking

  • 0

I have a page which has a modal pop up which shows on clicking a link button. I have disabled the link button but on clicking the disabled link button also the modal pop up appears. It works fine in all other browsers except Chrome. How to prevent modal pop up from being shown when the link button(target control) is disabled?

The code is given below:

 <cc1:ModalPopupExtender ID="ModalPopupExtender" runat="server" BackgroundCssClass="modalBackground"
            CancelControlID="imgbtnCancel" DropShadow="true" PopupControlID="panelTenant"
            TargetControlID="lnkbtnTenant">
        </cc1:ModalPopupExtender>
        <asp:Panel ID="panelTenant" CssClass="modalPopup" Style="display: none" Width="400px"
            runat="server">
        <asp:Button ID="btnTest" Text="Test" runat="server"></asp:Button>
        </asp:Panel>

In page_load event of the code, I have checked a condition and disabled the link button when the condition fails.

if (ds.Tables[3].Rows.Count > 0)
            {
                lnkbtnTenant.Enabled = true;
                lnkbtnTenant.Text = "Click to view Tenant Details";               
            }
            else
            {
                lnkbtnTenant.Enabled = false;
                lnkbtnTenant.Text = "Tenant Details not available.";                
            }

Edited to include the generated-html, posted by OP in the comments:

This is the resulting HTML of the modal pop up:

<div id="ctl00_head_panelTenant" class="modalPopup" style="width:400px;display: none">
     <input type="submit" name="ctl00$head$btnTest" value="Test" id="ctl00_head_btnTest"/>
</div>

This is the resulting HTML of the disabled button:

<a id="ctl00_head_lnkbtnTenant" disabled="disabled" class="para1">Tenant Details not available.</a>
  • 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-20T21:21:03+00:00Added an answer on May 20, 2026 at 9:21 pm

    It looks like ASP.NET puts a disabled=”disabled” attribute onto the anchor, which is not valid HTML. Chrome ignores this non-standard attribute, hence you can still click on the link.

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

Sidebar

Related Questions

I have a page which has document.body.onload=function(){...} but this is suffering delays because the
This may sound a weird question, I have a page which has a link:
OK, I have a page which shows the customer how many Widgets he has.
I have an ASP.NET page which has a button it it. The button click
Lets say I have a main page which has a link that opens a
I have this page which has three peson searchs on them. Basically it's a
I have a page which has an Html.DropDownList which takes in a viewdata parameter.
I have a page which has an Iframe. In that Iframe, there are six
I have a page which has several <canvas> elements. I am passing the canvas
I have a page which has a tree directory of people who work at

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.