I have a Repeater that contains ItemTemplate which has <li>'s. I need to access this <li> in the RepeaterProdView__ItemDataBound event.
<asp:Repeater ID="RepeaterProdView" runat="server" OnItemDataBound="RepeaterProdView__ItemDataBound">
<ItemTemplate>
<li id="liProdView" class="prodviewwide" runat="server">
<a href="#" onClick="javascript:swapPicture('../images/products/<%#Eval("option1Other")%>','../images/products/<%#Eval("option1Other2")%>','masterLink')">
<img src="images/products/<%#Eval("option1Desc")%>" height="125" />
</a>
</li>
</ItemTemplate>
</asp:Repeater>
I would like to dynamically change the class
<li id="liProdView" class="prodviewshort" runat="server">
Inside your
RepeaterProdView__ItemDataBoundmethod:That should do it.