List Info

Thread: VS.NET, Default Web Site, and relative paths...




VS.NET, Default Web Site, and relative paths...
user name
2006-12-14 14:48:41
In situations where ~/... can't be used, e.g., client
script, just use the
simple relative path. So instead of using, say,
/myapp/images/logo.gif just
specify images/logo.gif.

-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailtoOTNET-WE
BDISCUSS.DEVELOP.COM] On Behalf Of Ben Joyce
Sent: Thursday, December 14, 2006 3:24 AM
To: DOTNET-WEBDISCUSS.DEVELOP.COM
Subject: [DOTNET-WEB] VS.NET, Default Web Site, and relative
paths...

Morning all.

I am developing a website in VS.NET 2005 on an XP machine
and by
default it has created the site under the Default Web Site
on the
local machine.  When I run my app within VS.NET or browse it
mnually I
find it at the following address:

http://localhost/
myapp/default.aspx

Within my application I reference other pages using the
syntax
"/myapp/blah/blah/blah" - (such as the main menu
at the root, the
images folder, and various other shared resources).

This works fine locally and in the development stages, but
when in
production the website will not live under a /myapp folder
from the
Default Web Site root - it will be a new website.

This causes a problem with referencing the site root as
"/myapp".

I'd like to find a solution that works in both situations
without
making any code changes when I put the site into production.

Any help or thoughts appreciated.

Cheers,

Ben

===================================
This list is hosted by DevelopMentorR  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )