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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:32:47+00:00 2026-05-22T12:32:47+00:00

I have a master page where in I have a link button. In one

  • 0

I have a master page where in I have a link button. In one of the content pages, I need to hide the linkbutton and replace with image button. The click event handler for image button should exactly do the same thing as the click event of the link button in master page. So is there a way of calling the Master page link button click event handler from the Image button click event handler in Content page?

I have researched and there seem to be a lot in case Master page wants to call the event handler in Content page…

Any inout will be highly appreciated.

Thanks

  • 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-22T12:32:48+00:00Added an answer on May 22, 2026 at 12:32 pm

    In your master page’s code behind replace the protected keyword on the event handler to public.

        public void LinkButton1_Click(object sender, EventArgs e)
        {
            //Do Stuff Here
        }
    

    IN your content page use the Master Type Directive

    <%@ MasterType VirtualPath="~/masters/SourcePage.master"" %> 
    

    In the code behind for the content page call the Master event handler as follows

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            this.Master.LinkButton1_Click(sender, e);
        }
    

    Note the code is C#.

    I’m looking into calling the master pages event handler more directly

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

Sidebar

Related Questions

i have master-content page scenario.I have a link button on content page. that redirects
I have one master page which applies to all pages in this website. On
i have a logout [link button] in master page and i want to show
I have a master page which references a style in the following manner: <link
I have a master page with Header, Menu, Content and Footer panes in my
I have a Master Page which has an associated css file. On one of
I have set of link buttons in my masterpage and one button in my
I have a master page that has an update panel on it. One of
In my ASP.Net page, i have a few link button controls which are placed
I have a web content form whose master page is a nested master page.

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.