468,115 Members | 2,133 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,115 developers. It's quick & easy.

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

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?

Nov 20 '08 #1
1 1451
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;

"Andy B" <a_*****@sbcglobal.netwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>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?
Nov 21 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Martin Dew | last post: by
reply views Thread by Tim::.. | last post: by
6 posts views Thread by tshad | last post: by
7 posts views Thread by rn5a | last post: by
7 posts views Thread by =?Utf-8?B?cGF0cmlja2RyZA==?= | last post: by
5 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.