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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:20:37+00:00 2026-05-18T00:20:37+00:00

I have a control which extends UserControl . This control contains two ComboBox controls.

  • 0

I have a control which extends UserControl. This control contains two ComboBox controls. I’ve created an event handler which fires when either of the combos changes:


public event EventHandler ComboChanged
{
add { cmbA.SelectedIndexChanged += value; cmbB.SelectedIndexChanged += value; }
remove {...}
}

When I add an event handler to this event, is there any way for the sender to be reported as the custom control (i.e. the ComboBox’s parent control) rather than the ComboBox itself? Or am I trying to do something I shouldn’t be doing here?

  • 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-18T00:20:38+00:00Added an answer on May 18, 2026 at 12:20 am

    You should have something like this :

    public event EventHandler MyControlChanged
    

    and then in your userControl two functions for each of the ComboBox

    protected void oncmbA_SelectedIndexChanged(object sender, EventArgs e)
    {
       if (MyControlChanged!=null)
         MyControlChanged(this, e);//or some new Eventagrs that you wish to communicate
    }
    
    protected void oncmbB_SelectedIndexChanged(object sender, EventArgs e)
    {
       if (MyControlChanged!=null)
         MyControlChanged(this, e);//or some new Eventagrs that you wish to communicate
    }
    

    this would then refer to the UserControl and not to the combobox that fired your UserControl’s event.

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

Sidebar

Related Questions

I have a control which I wrote for capturing signatures on a web page,
I have an ExtJS ListView control with 4 columns. One of the columns contain
I'm learning how to write a scriptable ActiveX control. My goal is to have
I have a .Net 3.5 website which uses windows authentication and expires the session
I am using jQuery within a server side control to post back to a
I'm looking to extend the GridSplitter in some way to add a button which
i have certain pages in my website that i would like to only be
We have an existing certificate issuing application (C#, ASP.NET, JavaScript) that issues certificates to
I'm newbie to Game programming. I'm trying to develop a simple shooting game. The
I was wondering if anyone had any luck with the following senario in flex.

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.