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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:25:05+00:00 2026-05-30T23:25:05+00:00

I have a store implemented in ASP.NET/C#. There is a page – ReservationProduct.aspx –

  • 0

I have a store implemented in ASP.NET/C#. There is a page – ReservationProduct.aspx – which has a control to show the product – BuyTourProduct – and another control to show product details – TourProductDetail.

I know it is good form to keep the two decoupled but this is for a very specific store use. I want the BuyTourProduct to be able to set a panel in the TourProductDetail control to be visible or not using PanelName.Visible=true|false.

How do I have one control set attributes on a panel in the other control? I hope I am saying this clearly enough.

By the way, this is a couple of 3rd product controls that I’m modifying so changing the fact that they are 2 separate controls is not really an option for us.

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-30T23:25:07+00:00Added an answer on May 30, 2026 at 11:25 pm

    In the context of the UserControl, the user control is not aware of the other UserControl or it’s contents. You’ll need to interact with the controls at the Page context, because the Page is aware of both controls.

    You will need two things:

    • An event fired from the BuyTourProduct control.
    • A method to interact with the PanelName in the TourProductDetail control.

    If an event exists already, use that; otherwise, it will require you to modify the source of the BuyTourProduct, and expose an event and fire that event within that code. You’ll then also want to call this event from within the control.

    public class BuyTourProduct : UserControl
    {
        // ...
    
        public delegate void MyHideEventDelegate();
        public event MyHideEventDelegate MyHideEvent;
    
        // ...
    
        public void SomeFunction()
        {
            if (MyHideEvent != null)
                MyHideEvent();
        }
    
        // ... 
    }
    

    Next, you’ll need to add a method to interact with PanelName inside TourProductDetail:

    public class TourProductDetail : UserControl
    {
        // ...
    
        private Panel PanelName;
    
        // ...
    
        public void SetPanelNameVisible(Boolean visible)
        {
            PanelName.Visible = visible;
        }
    
        // ...
    }
    

    From the Page, you’ll subscribe to the event you want or the MyHideEvent:

    public partial class ReservationProduct : System.Web.UI.Page
    {
        // ...
    
        protected void Page_Load(object sender, EventArgs e)
        {
            buyTourProduct.MyHideEvent += new BuyTourProduct.MyHideEventDelegate(buyTourProduct_MyHideEvent);
        }
    
        // ...
    
        void buyTourProduct_MyHideEvent()
        {
            tourProductDetail.SetPanelNameVisible(false);
        }
    
        // ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello Freinds I am new to this Asp.net MVC Control.. I have a page
I have the following code which pulls json data from an ASP.NET page and
I am teaching myself asp .net mvc3. I have a partial view which uses
I have to create an RDLC report in asp.net. For which I am writing
I have just re-implemented an ASP.NET web application that uses NHibernate to use a
I have to store key value pairs in java which is more memory efficient
I have been reading articles about state management in ASP.NET for few days for
I'm using ASP.NET and a Repeater control to display my data. The data I
I am building an ASP.NET UI on an existing system, which consists of separate
I'm developing an Asp.net (MVC but this doesn't really matter) application. I have a

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.