This is my code:
Codebehind:
public class data
....
...
public List<dataImages> Images { get; set; }
...
var data= GarageBLL.LoadData(Convert.ToInt32(DataId), Convert.ToInt32(MemberId));
rptImages.DataSource = data.Images.Take(3);
rptImages.DataBind();
aspx:
<asp:Repeater runat="server" ID="rptImages">
<ItemTemplate>
<asp:Image runat="server" CssClass="img1" ImageUrl='<%# String.Format("/images/{0}/{1}.{2}", DataId, Eval("ImageId"), Eval("Extension")) %>' />
</ItemTemplate>
</asp:Repeater>
So, this works at the moment, but i would like to add different classes to each image. Anyone got any idea how i can do that?