title: One user control updating another during AJAX Postback?
body: <p>I developed a user control that displays a list of products and it works pretty good.  Then I dropped this user control into another user control that allows the user to pick different criteria and the product UC updates to show those products, all pretty slick and with AJAX via UpdatePanel.</p>
  
  <p>All was working just fine... then another requirement came in.   The "search" control needs to be separate from the product control (so they can be positioned separately).  Initially, I thought this was no problem as I would give the search control a reference to the product control and then it would talk to it via reference instead of directly inside the control (which has been removed).</p>
  
  <p>And they do talk.  But the product control loads, but refuses to display.</p>
  
  <p>I checked and it is being passed via reference and not a copy ( as best I can tell ).</p>
  
  <p>There is an updatepanel in the search control.  There is an update panel in the product control.  And then for good measure, there is an update panel surrounding them both in the actual search aspx page.</p>
  
  <p>I've tried setting the product control update panel to conditional and then fire the .Update() method manually. </p>
  
  <p>What's the secret here?  </p>
  
  <p>TIA!</p>
  
  <p><strong>SOLVED</strong></p>
  
  <p>Thanks to <strong>Jamie Ide</strong> for the tip to use events.</p>
  
  <p>Search Control and Product control still have internal update panels, and NO LONGER have them on this particular page.</p>
  
  <p>Search Control now raises an event OnSearchResultsUpdated and exposes the found items in properties.  The page subscribes to this event and takes the properties and passes them to the product control and triggers triggers a .Refresh() method on the product control which simply calls the .Update() on its internal updatepanel.</p>
  
  <p>The Product control, FYI, accepts products in several different flavors.  A list of distinct SKUs, a list of product ids, a named collection in our database and finally a given product category.  </p>
  
  <p>Our designers need to be able to create a new page, drop the control onto it and set some properties and voila! New site page.  They don't want to require a programmer's involvement.  So keeping the controls self contained is a requirement.  Fortunately all the changes I made still work completely with the other uses of the product control.</p>
  
  <p>THANKS AGAIN SO MUCH!</p>