473,508 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Directory structures different on development machine vs. install machine.

UJ
So I have a project called Fred that's a web site. On my machine, the url is
http://localhost/Fred/..... On the final resting place it's
www.fred.com/...

So how do I make the system so that it will work both in my development
environment and the delivered web site? For instance - I want to do a system
transfer somewhere - but I don't want to specify
"../../LoveItOrLeaveIt.aspx" because the directory structure could change.
And if I try and do "/LoveItOrLeaveIs.aspx" it works on the delivered site
but not the development site.

The only thing I can think of is to make a virtual directory that point to
the root and then have everything point to that.

Anybody have any suggestions?

TIA - Jeff.
Sep 22 '06 #1
2 1197
Hi,
You can use the web application root operator (~), which is resolved to the
root of the current application
for example: Response.Redirect("~/Folder/sample.aspx");
Or you can use it in the server controls
<asp:image runat="server" id="Image1"
ImageUrl="~/Images/SampleImage.jpg" />
Regards,
Mohamed Mosalem
"UJ" wrote:
So I have a project called Fred that's a web site. On my machine, the url is
http://localhost/Fred/..... On the final resting place it's
www.fred.com/...

So how do I make the system so that it will work both in my development
environment and the delivered web site? For instance - I want to do a system
transfer somewhere - but I don't want to specify
"../../LoveItOrLeaveIt.aspx" because the directory structure could change.
And if I try and do "/LoveItOrLeaveIs.aspx" it works on the delivered site
but not the development site.

The only thing I can think of is to make a virtual directory that point to
the root and then have everything point to that.

Anybody have any suggestions?

TIA - Jeff.
Sep 22 '06 #2
UJ
Thanks for the info but that doesn't work all the time. One of the things
I'm trying to do is to make the rollover on a few buttons change the graphic
image. But if I put ~/Images it doesn't understand it. The only way I've
been able to make it work is by setting up a virtual directory and reference
that there.

Is there a better way to do this?
"Mohamed Mosalem" <Mo************@discussions.microsoft.comwrote in
message news:9A**********************************@microsof t.com...
Hi,
You can use the web application root operator (~), which is resolved to
the
root of the current application
for example: Response.Redirect("~/Folder/sample.aspx");
Or you can use it in the server controls
<asp:image runat="server" id="Image1"
ImageUrl="~/Images/SampleImage.jpg" />
Regards,
Mohamed Mosalem
"UJ" wrote:
>So I have a project called Fred that's a web site. On my machine, the url
is
http://localhost/Fred/..... On the final resting place it's
www.fred.com/...

So how do I make the system so that it will work both in my development
environment and the delivered web site? For instance - I want to do a
system
transfer somewhere - but I don't want to specify
"../../LoveItOrLeaveIt.aspx" because the directory structure could
change.
And if I try and do "/LoveItOrLeaveIs.aspx" it works on the delivered
site
but not the development site.

The only thing I can think of is to make a virtual directory that point
to
the root and then have everything point to that.

Anybody have any suggestions?

TIA - Jeff.

Oct 24 '06 #3

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

Similar topics

1
1872
by: andrew cooke | last post by:
Hi, At work I'm using a machine running Red Hat Linux, with various python versions installed. For some reason there's no config directory (and so no makesetup) in /usr/lib/python2.3/ - is this...
2
1495
by: Hamish Dean | last post by:
Thisw may be off topic. Sorry if it is. I've got an application, and it gets installed to a particular directory (they choose) on a users computer. How do I find out what this directory is at...
0
1448
by: Brian Young | last post by:
(Sorry for double post) We are investigating the conversion of all our Legacy applications to VS.Net. Most of our applications run as ActiveX Controls hosted in Internet Explorer. This has...
8
17432
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
8
3364
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
940
by: UJ | last post by:
Is there any way to have it so that you can have different root structures on a web site on two different machines? For instance - on my dev machine, I want to work in c:\inetpub\wwwroot\Devo...
8
6262
by: lawrence k | last post by:
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid...
0
2253
by: Ian Toltz | last post by:
Is anyone using System.DirectoryServices successfully in an application on Vista? Using this amazing article ( http://www.codeproject.com/useritems/everythingInAD.asp ) I've been working on...
4
1518
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
Hi, I am using Visual Studio 2003. After moving my project to a new development computer my project compiles and works on the new development computer but the program will not work when I...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.