Getting reference to a HyperLink that is inside a FooterTemplate of a DataList

  • Thread starter Thread starter Andy B
  • Start date Start date
A

Andy B

I have this code:

<asp:DataList id="NewsList" runat="server">
<HeaderTemplate>
News list
</HeaderTemplate>
<ItemTemplate>
<!-- news article code goes here -->
</ItemTemplate>
<FooterTemplate>
<asp:HyperLink id="NewsArchiveLink" .. </asp:HyperLink>
</FooterTemplate>
</asp:DataList>

In the codebehind, how would I get access to the link in the footer?
 
I use this with a DetailsView. Maybe it's similar for a DataList, which I
haven't done?
Label lbl = dvAbstractText.FindControl("LabelAbstractText") as
Label;
 
Back
Top