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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:10:11+00:00 2026-05-14T03:10:11+00:00

I have 2 web user controls, both inherit the same base class which extends

  • 0

I have 2 web user controls, both inherit the same base class which extends UserControl. I want to raise an event on one and the other should be aware of it. both are on the same page however the 2nd control never handles the custom event i raised on the 1st one ! any ideas ? please just point to an implementation of possible (BTW, i’m googling it since morning but no luck !)

  • 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-14T03:10:11+00:00Added an answer on May 14, 2026 at 3:10 am

    You can easily do the following:

    1) create an event in control 1.
    2) create a public method in control 2, that gets called if the event in control 1 is raised
    3) subscribe to the event of control 1 (where you instanciate them, e.g. another control, a content page or a master page)
    4) inside the event handler from 3), call the method created in 2)

    5) do the other thing around, if control 2 should communicate with control 1

    This all require server-side execution. I’m sure there might be also client-side solutions.

    Edit after comment:
    There are only two possible communication ways I can think of:
    1) the controls don’t know each other and therefore can’t communicate directly. => you need a third control/page/masterpage/whatever (database, service etc) to enable the communication
    2) the controls reference each other and therfore can communicate directly => very bad OOP. If you use this, you do not understand OOP at all and should consider your job

    Feel free to chose one of the options.

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

Sidebar

Related Questions

Right now I have a base class for my pages which inherits System.Web.UI.Page and
I have a web user control that contains several other (web user) controls and
We have an existing publicly accessible web application with user controls, data access libraries,
I have a web page that uses three controls to allow a user to
I have the following code: public partial class queryTerm : System.Web.UI.UserControl { private static
I have two web forms which are filled in by the user. They contain
I have an ASP.NET page with two instances of the same Web User Control
I have written a Sharepoint 2007 web part which requires validation in both the
We have several user controls in VS 2010 in a web project that we'd
I have a scenario where i want : To create a data class which

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.