title: How to Change div Visibility from a User Control using c#
body: <p>I have got myself really tied up with a web user control and the changing of a <code>&lt;div&gt;</code>'s visibility in the parent ASPX.</p>
  
  <p>I have a shopping cart which is inside a User Control and within one of the pages the UC is included there is a status <code>&lt;div&gt;</code> which shows a summary of the cart contents. If the cart is empty it shows a different <code>&lt;div&gt;</code>. </p>
  
  <p>Code in UC</p>
  
  <pre><code>if (varCartStatus)
  {
    cartStatusTrue.Visible = true;
    cartStatusFalse.Visible = false;
  else
  {
    cartStatusTrue.Visible = false;
    cartStatusFalse.Visible = true;
  }
  </code></pre>
  
  <p>All I get at the moment is 
  'cartStatusTrue' does not exist in the current context.
  'cartStatusFalse' does not exist in the current context.</p>
  
  <p>How do I get the UC to change the visibility of the <code>&lt;div&gt;</code> that's in the parent ASPX? </p>
  
  <p>Sorry, I very new to .net and C# and I'm totally lost (again!)</p>