directxBOB
asked on
Finding a repeater item by index?
I have the following repeater:
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSourc e1" OnItemDataBound="Repeater_ ItemDataBo und" >
<HeaderTemplate>
<ul id="navbar">
</HeaderTemplate>
<ItemTemplate>
<li><span>
<asp:ImageButton ID="imgButton" ImageUrl='<%# Bind("Image") %>' runat="server" PostBackUrl='<%# Bind("Path") %>'
AlternateText='<%# Bind("AltText") %>' CssClass='<%# Bind("Clicked") %>' /></span>
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
In the Repeater_ItemDataBound is it possible to get a previously bound item by index?
For example say that I was binding the 5th item in the repeater, is it possible to get access to the first item so that I can change the imagebuttons style sheet?
Thanks
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSourc
<HeaderTemplate>
<ul id="navbar">
</HeaderTemplate>
<ItemTemplate>
<li><span>
<asp:ImageButton ID="imgButton" ImageUrl='<%# Bind("Image") %>' runat="server" PostBackUrl='<%# Bind("Path") %>'
AlternateText='<%# Bind("AltText") %>' CssClass='<%# Bind("Clicked") %>' /></span>
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
In the Repeater_ItemDataBound is it possible to get a previously bound item by index?
For example say that I was binding the 5th item in the repeater, is it possible to get access to the first item so that I can change the imagebuttons style sheet?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.