You first use one integer on the code behind, that is start with 1. Then on repeater you check this value and you go like:
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<% if (iCounter == 1) { %>
<br />First line id: <%# GetID(Container.DataItem) %>
<% } else { %>
<br />Next lines id: <%# GetID(Container.DataItem) %>
<% }
iCounter++;
%>
</ItemTemplate>
</asp:Repeater>
and on code behind:
public int iCounter = 1;
List<int> oMainIds = new List<int>();
protected void Page_Load(object sender, EventArgs e)
{
for (int i = 0; i < 10; i++)
{
oMainIds.Add(i);
}
Repeater1.DataSource = oMainIds;
Repeater1.DataBind();
}
public int GetID(object oItem)
{
return (int)oItem;
}
Please note, for the test, here I place and 10 data lines. This example renders:
First line id: 0
Next lines id: 1
Next lines id: 2
Next lines id: 3
Next lines id: 4
Next lines id: 5
Next lines id: 6
Next lines id: 7
Next lines id: 8
Next lines id: 9