473,320 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Reative Paths and VS2005 Web Server

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
br***@classic-soft.com

Feb 3 '06 #1
1 1138
Ok, please ignore, I was doing something wrong, the ~ does work.

"Brien King" <br***@classic-soft.com> wrote in message
news:OD*************@TK2MSFTNGP09.phx.gbl...
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
br***@classic-soft.com

Feb 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: Lovely Angel | last post by:
Dear Friends Hope you doing great. I have recently shifted to a webhost which is Using Windows 2003 and IIS 6. Now my application was working fine earlier but now I am facing this problem ...
8
by: nick | last post by:
I have a problem and I've been using a cheezy work around and was wondering if anyone else out there has a better solution. The problem: Let's say I have a web application appA. Locally, I set...
2
by: tsteinke | last post by:
Okay here is the situation I am developing a ASP.Net application locally and then I copy the project up to my web server. I start out by creating an ASP.NET Application ...
7
by: Robert | last post by:
I have the function below. it returns a "simpleresult" which I've also included the definition of below. In VS2005 (after upgrading the project), I get a warning indicating that Function...
10
by: musosdev | last post by:
Hi guys I'm trying to migrate to VS2005... I've managed to do that, but realised I'd opened my web projects as file projects, and I'm getting the error about network BIOS command limit. ...
17
by: Michael | last post by:
Hello, I am writing an app that will sit on the desktop. It needs to be able to make a copy of a folder that sits on the server. It will copy the folder from the server and place it in the same...
3
by: JeffDotNet | last post by:
I wrote a small data processing application that writes a summary of several hundred files. I use drag and drop on a panel (Panel1) to grab the absolute path to each of these files. Then I begin...
2
by: topgene | last post by:
question describe: i used C# write the follow method: -------------------------------------------------------------------------------- public static void GetMp3FileFromAudio(string...
29
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. How do I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.