HyperLink control vs. Firefox

Discussion in 'ASP .Net Web Controls' started by Arthur Dent, Jun 16, 2006.

  1. Arthur Dent

    Arthur Dent Guest

    Hello all.... i am REally confused by something...

    I have a hyperlink control on my page, and for the NavigateUrl property, i
    have it set to "~/" in the property window (without the quotes).
    Now, in IE this works beautifully, and the hyperlink redirects you to the
    root of the web application.
    In Firefox however it redirects you simply to the page you are currently on.
    If you mouse over the link, the url that comes up in the status bar is the
    exact url (including querystring) of whatever page you currently have
    loaded.

    I do not understand this at all. Isn't ~/ supposed to be resolved by the
    control at runtime *on the server-side*?? So how does it come out different
    in Firefox vs. IE?
    Using ~/ in other controls and properties seems to work fine, (such as the
    ImageUrl of the HyperLink and the Image controls). It is only in the
    HyperLink.NavigateUrl property that i see this strange behaviour.

    Ive seen this now on two different sites that weve done for two different
    clients.

    Can anyone explain this bizarre behaviour?
    Thanks!

    - Arthur Dent.
     
    Arthur Dent, Jun 16, 2006
    #1
    1. Advertising

  2. Arthur Dent

    Ronny Ong Guest

    "Arthur Dent" <> wrote in message
    news:%...
    > I do not understand this at all. Isn't ~/ supposed to be resolved by the
    > control at runtime *on the server-side*?? So how does it come out
    > different in Firefox vs. IE?
    > Ive seen this now on two different sites that weve done for two different
    > clients.


    Did you try stripping everything out of your problematic pages to be sure
    the fault was in the HyperLink control? It took me about 45 seconds to slap
    together the following test page and prove that it works fine in Firefox
    1.5.0.4. I would say that you've simply made the same mistake twice on your
    two "different" sites.

    <html>
    <head><title>Test</title></head>
    <body>
    <asp:HyperLink
    NavigateUrl="~/somewhere/something.htm"
    runat="server"
    Text="HyperLink Testt" />
    </body>
    </html>
     
    Ronny Ong, Jun 17, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3RldmUgRm9yZA==?=

    BackColor attribute in HyperLink doesn't work in Firefox

    =?Utf-8?B?U3RldmUgRm9yZA==?=, Oct 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    575
    =?Utf-8?B?U3RldmUgRm9yZA==?=
    Oct 10, 2005
  2. Arthur Dent

    HyperLink control vs. Firefox

    Arthur Dent, Jun 16, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    414
    Ronny Ong
    Jun 17, 2006
  3. davetichenor
    Replies:
    1
    Views:
    864
    Eliyahu Goldin
    Oct 30, 2006
  4. Ken
    Replies:
    1
    Views:
    397
    Alvin Bruney
    Aug 16, 2003
  5. Dave
    Replies:
    0
    Views:
    970
Loading...

Share This Page