title: How to add labels dynamically to html
body: <p>I'm getting data into my code behind file in the format of array list. The sproc will return several records depending upon the input parameter value. Now i need to display all these values in HTML as labels dynamically. </p>
  
  <p>For example if i got 2 records, i just need to display those 2 records, if 10 records are returned then display 10 records. I don't want keep 10 static labels to bind all the time. I just looking to place only one label in html and want to use that one to display all the records returned by query. Will it be possible??</p>
  
  <pre><code>Sample code:
  
  //Client side
  &lt;asp:Label ID="lblresult" runat="server" CssClass="label" &gt;&lt;/asp:Label&gt;
  
  //server side
  
       Dim arraylist as arrayList = //result from sproc                   
                  Dim lbltext As String = ""        
                  For Each item In arraylist        
                      Do While item.value = lbltext
                          Me.lblresult.Text = item.value
                          lbltext = item.value        
                      Loop                       
                  Next                  
  </code></pre>
  
  <p>Please let me how to solve this? Thanks in advance!</p>