Solved

Best practices in project design

Posted on 2008-10-07
7
212 Views
Last Modified: 2013-11-26
I have a project called CS that I am considering, for simplicity and maintenance purposes, rearranging all the images, .js files, includes etc. I am considering placing them all in the root directory under the project. Other pages with these items in folders underneath this project folder would then point to the root for images, includes etc.
Is this a good way of doing things or should I create image, include folders in these folders underneath the root? I can refer to the root folder by http://localhost/CS/images or by using "/images for example but when I publish the project, CS will be the URL and in my development environment, I can see the images so how do I set up my project to not display the CS and just have http://localhost/images be displayed in my development environment. This should then transfer once in production right? Thanks for any guidance.
0
Comment
Question by:wilcor14
  • 4
  • 3
7 Comments
 
LVL 18

Expert Comment

by:David Robitaille
ID: 22661218
should I create image, include folders in these folders underneath the root?
absolutely
instead of using "http://localhost/images" you could use "~/images" for server control...
also take a look at this
http://www.asp101.com/resources/paths.asp 
 
0
 

Author Comment

by:wilcor14
ID: 22662503
davrob60, thanks. That article was helpful. My project is set up a bit differently. Someone else set it up for me. The physcal location of the files are under C:\Source2005.Net\CS How would you suggest I proceed?
0
 
LVL 18

Expert Comment

by:David Robitaille
ID: 22662753
thats the magic of the ~ . You dont have to bother with the  "http://localhost/CS/" part, it will aways be Corrected according to the "root" of your virtual directory.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 18

Expert Comment

by:David Robitaille
ID: 22662774
0
 

Author Comment

by:wilcor14
ID: 22662890
Thanks again. It works great within the image tag but does it work within the Body tag for Background? I tried it but not having success with that one.
0
 
LVL 18

Accepted Solution

by:
David Robitaille earned 500 total points
ID: 22662925
0
 

Author Closing Comment

by:wilcor14
ID: 31503868
Thanks for the help. Some good info.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question