title: Dynamic ID name in ASP.NET VB.NET
body: <p>I have about 20 <strong>asp:labels</strong> in my ASP page, all with <strong>ID="lbl#"</strong>, where # ranges from 0 to 22. I want to dynamically change what they say. While I could write</p>
  
  <pre><code>lbl1.Text = "Text goes here"
  </code></pre>
  
  <p>for all 23 of them, I'd like to know if there is a way to loop through all of them and change their text.</p>
  
  <p>I thought of creating an array with all my labels, and then just do a <strong>For Each</strong> loop, but I also have to check if the element exists with <strong>IsNothing</strong> before I change its text, so I got stuck there.</p>
  
  <p>If anyone can help me, I'd really really appreciate it!</p>
  
  <p>Thank you so so much for your help!!</p>