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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:46:28+00:00 2026-06-02T09:46:28+00:00

I have a usercontrol that is inside another user control, what I would like

  • 0

I have a usercontrol that is inside another user control, what I would like to do is after a certain process runs to find the button control in the parent and run the OnClick event.

usercontrol 1

protected void btnReload_Click(object sender, EventArgs e)
{
    //reloads data
}

usercontrol 2 (embeded in usercontrol 1)

protected void btnSave_Click(object sender, EventArgs e)
{
    Button btnReload = (Button)Parent.FindControl("btnReload");
    //here fire the btnReload onclick even
}

if this is not the best way I take recomendations cause I’m to the point of pulling my hair out over this. The reason I am doing this is because I have 8 pages that all require to create a new user so I would like to use 1 usercontrol for that but reload the page they are on with that new user created.

  • 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-02T09:46:30+00:00Added an answer on June 2, 2026 at 9:46 am

    There are two ways you can do it :

    1. On Server Side.

    What you are trying to do is architecture wise wrong, child should not try to find controls in parents and neither should parent. So Child control can have a custom event, parent can register to it and you can fire that event on child control’s button click event.

    Here’s an article to get you started : http://codebetter.com/brendantompkins/2004/10/06/easily-raise-events-from-asp-net-ascx-user-controls/

    This has also been discussed here : How do you determine when a button is clicked in the child on the parent – ASP.NET

    2. Client Side :

    Using JQuery, you can catch child control’s button click event and from there you can fire parent’s button’s click. You can share parent’s button’s id using a hidden variable.

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

Sidebar

Related Questions

I have web user control A that uses another web user control B. Inside
I have an ASP.NET user control that is used in another use control. The
so I have this UserControl that's inside of another UserControl. Lets call them ParentUC
I have a user control that inside has a TextBlock (textmsg), the following is
I have a custom user control DatePicker.cs. Inside of another piece of code I
I have a datalist inside a usercontrol that gets loaded into a page where
I have a usercontrol that hides a div when a button is clicked. <asp:LinkButton
I want my User Control to be able to have Literal Content inside of
I have written a user control that captures some user input and has a
I have a Canvas inside a UserControl that can be panned around. I want

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.