Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asp:HyperLink Question

Status
Not open for further replies.

mj616

MIS
Jun 23, 2003
73
US
Can anyone explain to me why this won't work.

.aspx
<asp:Hyperlink NavigateURL= "<%# appLocation %>" runat='server' id='link'>text</asp:hyperlink>

codebehind
public appLocation = "server.whatever";

Why doesn't my NavigateUrl get filled with the value?

Thanks for the info.

MJ
 
You should try setting the value in the code behind file. e.g.
Code:
public appLocation = "server.whatever";
link.NavigateURL = appLocation;


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
That is what I am doing now. However I have about 20 or so links and images on pages. So it would be easier to do it with the bind expression <%# %> than in code.

The reason this is needing to be done to images and links is for different enviroments this web app is going to be setup on, I.E. dev, test, prod.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top