Hyper Link Issue

  • Thread starter Thread starter Jared
  • Start date Start date
J

Jared

Hi

I have a page which creates HTML dynamically from a database. It
creates some hyperlinks in the following format;

<a href='../anotherSite/mypage.aspx'>MyPage</a>

When I click on this link it takes me to
http://myServer/myCurrentSite/anotherSite/mypage.aspx, which doesn't
exist. I want to to take me to http://myServer/anotherSite/mypage.aspx.

When I use the same url in Response.Redirect it works perfectly. All
other hyperlinks to the current site and folders below that work fine,
just the ones looking at other sites are failing. I don't want to use
absolute links as it is running on more than one server.

Any help here would be much appreciated.

Thanks

Jared
 
Hello Again

I found a solution. For some reason the '<a href' requires '../../' and
Response.Redirect only requires '../'.

I just check for the '../' on the response.redirect and use
..substring(3).

Thanks

Jared
 
Back
Top