5
Answers

Repeater Problem

Vikas Ahlawat

Vikas Ahlawat

13y
6.3k
1
I have taken a repeater control and inside it an image control , I want to apply style only on first image , how can i do this , that when i bind the data then style apply on first image like
<img src="images/album1/bw/2.jpg" alt="" style="display:block;"/>
<img src="images/album1/bw/2.jpg" alt="" />
<img src="images/album1/bw/2.jpg" alt="" />


<asp:Repeater id="categoryimageRepeater" runat="server"

onitemdatabound="categoryimageRepeater_ItemDataBound1">
<ItemTemplate>
<asp:Image ID="categoryImageButton" runat="server" AlternateText="" ImageUrl ='<%# "~/Albums/" +Eval("ID")+"/"+ Eval("Imagepath") %>' />
</ItemTemplate>

</asp:Repeater>

Answers (5)