R
Roshawn
Hi,
I have a Repeater control that is databound to an array. This array
contains data regarding products (ie. Name, Price, Manufacturer, etc.).
I am wondering how do I display data in a control that is contained in the
Repeater's ItemTemplate?
Here's my example code:
Sub BindToArray()
'code for the array omitted here
Me.Repeater1.DataSource = products
Me.Repeater1.DataBind()
End Sub
<asp:Repeater>
<ItemTemplate>
<!-- say that I wanted to bind to the Name field of the array
<asp:Label id=Label1 Text=<%#
Container.DataItem("Name")%>></asp:Label>
</ItemTemplate>
</asp:Repeater>
Would this code work?
Roshawn
I have a Repeater control that is databound to an array. This array
contains data regarding products (ie. Name, Price, Manufacturer, etc.).
I am wondering how do I display data in a control that is contained in the
Repeater's ItemTemplate?
Here's my example code:
Sub BindToArray()
'code for the array omitted here
Me.Repeater1.DataSource = products
Me.Repeater1.DataBind()
End Sub
<asp:Repeater>
<ItemTemplate>
<!-- say that I wanted to bind to the Name field of the array
<asp:Label id=Label1 Text=<%#
Container.DataItem("Name")%>></asp:Label>
</ItemTemplate>
</asp:Repeater>
Would this code work?
Roshawn