Reative Paths and VS2005 Web Server

B

Brien King

Ok,

I'm converting a 1.1 ASP.NET app to 2.0 and I am using the VS2005 Web Server
to debug. The problem is that when I use a relative path in my links, it
generates the wrong links.

if I have

http://localhost:666/WebApp/index.aspx

Then in my code I do a

myLink.NavigateURL = "/index.aspx?blah=1"

it generates the following link

http://localhost:666/index.aspx?blah=1

rather then:

http://localhost:666/WebApp/index.aspx?blah=1

How do I get around this? I do not want to hard code the full path as this
would require a lot of changes and would defeat the purpose of having
relative paths. Adding a ~ in front does not help.

Thanks,


Brien King
(e-mail address removed)
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top