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:
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.
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.