title: asp.net - display data in ascx dynamically from results in c# document
body: <p>I have a cs document that dynamically changes values depending on array size:</p>
  
  <pre><code>size =something.length;
  if(size==1)
  {
  something1="a";
  }
  if(size==2)
  {
  something2="b";
  }
  etc....
  </code></pre>
  
  <p>In the ascx file I want to display the results dynamically based on the array size in the CS file. </p>
  
  <pre><code> &lt;asp:Label ID=something1 runat=serve&gt;&lt;/asp label&gt;
   &lt;asp:Label ID=something2 runat=serve&gt;&lt;/asp label&gt;
   &lt;asp:Label ID=something3 runat=serve&gt;&lt;/asp label&gt; ....etc
  </code></pre>
  
  <p>How would I do this? </p>