Hyper Link Issue

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
 
J

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
 

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,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top