Created
August 22, 2012 23:03
-
-
Save patocallaghan/3430422 to your computer and use it in GitHub Desktop.
.Net Repeater functionality #csharp #repeater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////Adding this so I don't forget | |
/* | |
In code-behind | |
var list = GetList(); | |
repeaterId.DataSource = list; | |
repeaterId.DataBind(); | |
*/ | |
<asp:repeater runat="server" id="spiceimages"> | |
<HeaderTemplate> | |
<div class="spice-images"> | |
</HeaderTemplate> | |
<ItemTemplate> | |
<div class="<%# SetFirstLastClass(Container.ItemIndex) %>" data-number="<%# Container.ItemIndex %>"> | |
<img src="<%# ((CustomObject)Container.DataItem).ImageUrl %>" width="120" height="220" alt="Visual of <%# ((CustomObject)Container.DataItem).Name %>" /> | |
</div> | |
</ItemTemplate> | |
<FooterTemplate> | |
</div> | |
</FooterTemplate> | |
</asp:repeater> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment