HyperLink control; NavigateUrl; IE vs. Mozilla

A

Arthur Dent

Hi all,

I seem to have found something rather odd.... certainly unexpected.
I had a hyperlink control on my site, a logo on the header section which
when clicked, took you back "home" to the root of the app.

I had the NavigateUrl set to "~/". Now my understanding was that this was
evaluated on the server before being emitted to the client, and that "~"
would
return the root of the web application.

Strange thing is, in mozilla, it returns instead the url of whatever page
you are
currently on. In IE it works as expected though. Why would the browser make
a difference here? If this is (supposedly) evaluated to "application root"
at run
time, on the server, how come it comes out differently with different
clients.
Its not as if it relies on any client-side script for that property.

Ultimately i resolved it with the following line of code in my Page_Load
event:
lnkLogo.NavigateUrl = ResolveUrl("~/")

Im just confused why it didnt work in the first place, and why, if i
manually do
the same thing as (what i thought) it was doing, it does work.

Cheers,
- Arthur Dent.
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top