You will be required to use either the itemdatabound event or itemCommand event of the repeater, a sample is given below.
ASPX:
<pre lang="xml"><asp:Repeater ID="MyRepeater" runat="server" OnItemDataBound="MyRepeater_ItemDataBound">
<HeaderTemplate>
<table border="0" cellpadding="2" cellspacing="0" width="100%" class="bo">
<tr class="tBg1">
<td align="Center" style="font-size: 18px">
<strong>Heading1</strong>
</td>
<td align="Center" style="font-size: 18px">
<strong>Heading2</strong>
</td>
<td align="Center" style="font-size: 18px">
<strong>Heading3</strong>
</td>
<td align="Center" style="font-size: 18px">
<strong>Heading4</strong>
</td>
<td align="Center" style="font-size: 18px">
<strong>Heading5</strong>
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr id="MainRow" runat="Server">
<td class="bor bob" align="left" style="font-size: 18px">
<asp:Label ID="status" runat="server" Text='<%# Eval("status")%>'></asp:Label>
</td>
<td class="bor bob" align="center" style="font-size: 18px">
<a id="lnkCount" runat="server" target="_blank">
<asp:Label runat="server" ID="Labell" Text='<%# Eval("1Count")%>'></asp:Label>
</a>
</td>
<td class="bor bob" align="center" style="font-size: 18px">
<a id="lnkCount24" runat="server" target="_blank">
<asp:Label runat="server" ID="Label1" Text='<%# Eval("2Count")%>'></asp:Label>
</a>
</td>
<td class="bor bob" align="center" style="font-size: 18px">
<a id="lnkCount48" runat="server" target="_blank">
<asp:Label runat="server" ID="Label3" Text='<%# Eval("3Count")%>'></asp:Label>
</a>
</td>
<td class="bor bob" align="center" style="font-size: 18px">
<a id="lnkCount72" runat="server" target="_blank">
<asp:Label runat="server" ID="Label2" Text='<%# Eval("4Count")%>'></asp:Label>
</a>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
CS:
protected void rptDetailed_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
HtmlAnchor lnkCount = (HtmlAnchor)e.Item.FindControl("lnkCount");
HtmlAnchor lnkCount24 = (HtmlAnchor)e.Item.FindControl("lnkCount24");
HtmlAnchor lnkCount48 = (HtmlAnchor)e.Item.FindControl("lnkCount48");
HtmlAnchor lnkCount72 = (HtmlAnchor)e.Item.FindControl("lnkCount72");
Label status = (Label)e.Item.FindControl("status");
}
}
You need to first find the required control from the repeater item in the event as mentioned in the example.
After that all the above variables can be easily used as regular asp .net controls.