Expression in HyperLink NavigateUrl property

D

David W

I would like to be able to evaluate an expression in the NavigateUrl
property of a HyperLink control. This is not a bound control. I know I can
do this easily in code-behind, but do not want to do it that way - I want to
be able to drop the link on any page.

<asp:HyperLink ID="hlHomePage" runat="server" NavigateUrl='<%#
Session("HomePath") & "home.aspx" %>' Text="Home"></asp:HyperLink>

The above does not evaluate and produces a link with no href, but doesn't
generate an error. Any suggestions other than doing it in code-behind?

Thanks,
Dave
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top