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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:25:07+00:00 2026-05-31T22:25:07+00:00

I have a button,Linkbutton and an ModalPopup. If I click button1 I need to

  • 0

I have a button,Linkbutton and an ModalPopup.

If I click button1 I need to click 2nd button automatically and Launch ModalPopup.But it’s not triggering at all.

Can anyone say me where am I going wrong?

This is my ModalPopup:

     <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton1"
                    PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="False"
                    CancelControlID="CancelButton" />
                <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none;
                    width: 300px;">
                    <asp:HyperLink ID="DownloadLink" runat="server" ForeColor="#0066FF">Download</asp:HyperLink>
                    <asp:Button ID="CancelButton" CssClass="btn-blue" runat="server" Text="Cancel" />
                    <asp:Button ID="button1" runat="server" Text="Select Image" Style="position: absolute;
                    left: 400px; top: 500px; z-index: 99;"/>
                <asp:LinkButton ID="LinkButton1" OnClick="LinkButton1_Click" runat="server" Visible="true"
                    Style="position: absolute; left: 620px; top: 500px; z-index: 99;">Close</asp:LinkButton>                
               </asp:Panel>

                <br />
            </ContentTemplate>
    </asp:UpdatePanel>

This is my code-behind:

1st Button:

Protected Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click

Linkbutton1_Click(Nothing,Nothing)

End Sub

2nd Button:

Protected Sub Linkbutton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles 
Linkbutton1.Click

ModalPopupExtender1.Show

End Sub
  • 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-31T22:25:09+00:00Added an answer on May 31, 2026 at 10:25 pm

    Unless there’s something I’m missing, the approach you’re using seems unnecessarily complicated. Just create a method that opens the dialog, and you can call it anywhere…

    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        //perform whatever logic you need
    
        //open the dialog
        ShowDialog();
    }
    
    protected void Button1_Click(object sender, EventArgs e)
    {
        //perform whatever logic you need
    
        //open the dialog
        ShowDialog();
    }
    
    private void ShowDialog()
    {
        ModalPopupExtender1.Show();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created Array of Linkbutton and when user click on link button it
i am adding more than one link button during runtime but they all have
I have Repeater with LinkButton with ID CommandArgument When I click that button, I
I have a usercontrol that hides a div when a button is clicked. <asp:LinkButton
I have this code in the end of link button click: Response.ContentType = application/zip;
I have one issue with UInavigationcontroller In my firstview i have button.If i click
I have a ModalPopup in the ItemTemplate of a GridView like <ItemTemplate> <asp:LinkButton ID=lnkbtnSeek
I am using DevExpress's GridView. I have edit button working fine. I need to
I have a scenario where I have to create the button on Asp:LinkButton. I
I have an .aspx page using System.Net.Mail for sending E-Mail messages. A linkbutton click

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.