|
The repeat define loop that controls the rendering of a repeat region. A collection is also defined, a member object of which is presented in every iteration of the loop.
The definition aspects is similar to that explained under the topic of the behavior-define section. The behavior-repeat would render a segment as many times as there are objects in a collection, presenting each object to the body of segment.
An equivalent for the repeat behavior is the asp:Repeater control, shown below.
<asp:Repeater id="myRepeaterPlain" DataSourceID="datasource1" runat="server"> <ItemTemplate> <%# Eval("Id") %>, <%# Eval("Name") %>, <%# Eval("URL") %>, <%# Eval("Image") %> </ItemTemplate> </asp:Repeater>
The Eval expression is the binding expression discussed under element descriptor value attribute.
|