Hello folks,
I am trying to loop multiple comments in two labels. For some reason, only the latest comment is being displayed in the label while when I output it using repsonse.write; all the comments display. I am pretty new to .NET and can't figure out what I am doing wrong. Any help would be great. Thanks.
Code:<asp:Label ID="lblID" runat="server"></asp:Label> <asp:Label ID="lblComment" runat="server"></asp:Label>Code:Dim dt As DataTable Dim dr As DataRow dt = ds.Tables(0) For Each dr In dt.Rows Response.Write(dr("commentID").ToString()) Response.Write(dr("placementId").ToString()) Response.Write(dr("comment").ToString()) lblID.Text = dr("placementId").ToString() lblComment.Text = dr("comment").ToString() Next dr


Reply With Quote





Bookmarks