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

  • Home
  • SEARCH
  • 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 3220806
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:48:13+00:00 2026-05-17T15:48:13+00:00

I am relatively new to this, but here is my problem. In asp.net, I

  • 0

I am relatively new to this, but here is my problem.

In asp.net, I have a parent and a child control. Within the child control I have a dropdown list. Based on dropdown list’s selected value I would like to toggle Visibility of Panel in parent control. For instance if I select Show in child control dropdown list, I need to pass true to parent control to make Panel visible and vice versa. How should I do that. I have read that can be done via the event handling and have seen certain scenarios but I am not clear on that. Please help!

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-17T15:48:14+00:00Added an answer on May 17, 2026 at 3:48 pm

    Raise an event that your parent control listens for.

    In the code behind for your parent control, create an object of the type of your child control. Something like:

    private MyWebControl childControl;
    

    Then in the child control, define an event

    public event System.EventHandler SelectionChanged;
    

    In the OnIndexChanged event of your DropDownList, after you do your processing, raise your event:

    if(this.SelectionChanged!= null)
    {
         this.SelectionChanged(this, new EventArgs()); 
         // You can send the index of the DDL in the event args
    }
    

    In your parent control, wire up the event. Page_Init is good

    this.childControl.SelectionChanged+=new EventHandler(childControl_SelectionChanged);
    

    Still in the parent control, define your method

    private void childControl_SelectionChanged(object sender, EventArgs e)
    {
          /// Do your processing here.
          /// Grab the DDL's index from the EventArgs and do your processing
    
    }
    

    Should be all you need to get it working!

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

Sidebar

Related Questions

I'm relatively new to Unix shell scripting. Here's my problem. I've used this script...
I thought I would find a solution to this problem relatively easily, but here
This may be a silly question, but as someone relatively new to PHP, I'm
I just cannot figure this out, it looks really simple but I'm relatively new
I'm relatively new to Java and would appreciate any help on this! I have
So I'm working at a company and I'm relatively new here but I've come
I'm relatively new at PHP and came across a slight problem. I have a
I'm relatively new to scripting and apologize in advance for this painfully simple problem.
I am relatively new to JavaScript and DOM, but have experience with C++. I
sorry if this is an obvious question, but I am relatively new to python

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.