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.
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??
Sample code:
//Client side
<asp:Label ID="lblresult" runat="server" CssClass="label" ></asp:Label>
//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
Please let me how to solve this? Thanks in advance!