Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>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. </p> <p>You will need two things:</p> <ul> <li>An event fired from the BuyTourProduct control.</li> <li>A method to interact with the PanelName in the TourProductDetail control.</li> </ul> <p>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.</p> <pre><code>public class BuyTourProduct : UserControl { // ... public delegate void MyHideEventDelegate(); public event MyHideEventDelegate MyHideEvent; // ... public void SomeFunction() { if (MyHideEvent != null) MyHideEvent(); } // ... } </code></pre> <p>Next, you'll need to add a method to interact with PanelName inside TourProductDetail:</p> <pre><code>public class TourProductDetail : UserControl { // ... private Panel PanelName; // ... public void SetPanelNameVisible(Boolean visible) { PanelName.Visible = visible; } // ... } </code></pre> <p>From the Page, you'll subscribe to the event you want or the MyHideEvent:</p> <pre><code>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); } // ... } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload