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

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?
 
P

Paul Shapiro

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top