0

I have been trying this and it does not seem like it wants to work out for me today. I want to have an hyperlink to a log folder which in IIS is enabled with directory browsing but asp.net does not like the link so it does not even send it to the client.

<asp:HyperLink ID="HyperLink8" NavigateUrl="~/logs/" runat="server"></asp:HyperLink>

The reason why I am doing this is that the log link is in the footer of the master page. I cannot control the virtual directory name so I cannot effectively use the anchor tag. Any one encountered this before ?

Thanks,

Stainedart
  • 1,929
  • 4
  • 32
  • 53
  • is the logs directory one level under the root in IIS? Have you tried the relative path by removing the ~ ? – benni_mac_b Feb 16 '12 at 21:24
  • Yes I have without the ~ it is the same issue. The hyperlink is never rendered in html – Stainedart Feb 16 '12 at 21:29
  • Different browsers may interpret this differently. Can you inspect the link with any kind of Web Dev tools? Does it show up in 'View Source'? What does the link look like if it does? – Precious Roy Feb 16 '12 at 21:29
  • Also there is no text value so the navigate url is not got anything to display? Is that just in this example? – benni_mac_b Feb 16 '12 at 21:30
  • Let me rephrase this the html is rendered but http://localhost/logs/ is the output once deployed. When the ~ is there the editor always flags it as an error – Stainedart Feb 16 '12 at 21:35
  • @benni_mac yes it is just a sample – Stainedart Feb 16 '12 at 21:35

1 Answers1

0

It probably is sending the link to the client, but without setting the Text value it will be invisible.

egrunin
  • 24,650
  • 8
  • 50
  • 93