How can i find a control in the footer template of a data repeater

sia picture sia · Nov 30, 2009 · Viewed 8.7k times · Source

ASPX : Code

<asp:repeater id="repeater" runat="server">

<headerTemplate></headerTemplate>

<itemtemplate></itemtemplate>

<footerTemplate> <asp:literal id=findme runate=server> </footerTeplate>

</asp:repeater>

What i am looking for is source code to be able to find the control within the footer of a data repeater. Im familiar with the basic "FindControl" when i do a databind or look for control within the page itself, but how can i find the control within a footer template of a data repeater?

Is this even possible? and if so how can i please get some assistance,

thanks again to all!!!

[update]

i need to be able to do this after the databind

Answer

Josh Stodola picture Josh Stodola · Nov 30, 2009
Protected Sub Repeater1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles Repeater1.ItemDataBound
    If e.Item.ItemType = ListItemType.Footer Then
        Dim Lit As Literal = CType(e.Item.FindControl("findme"), Literal)
    End If
End Sub