473,387 Members | 1,530 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,387 software developers and data experts.

subfolders in asp.net projects

We've got an existing asp.net project (using visual studio 2003) and have
several aspx pages in the project. We've decided that there are going to be
a lot of related aspx pages that we'd like to have in a subfolder for
organizational reasons. So, I created the new folder in the project and
"dragged" the aspx file (along with the cs and resx files) into this new
folder. Since the project was under source control VS warned me about doing
this and something to the effect of the solution wouldn't remember these
files. I'm now faced with two questions/issues:

1) I'm hoping that I can deal with the SourceSafe issues by simply creating
a subfolder/project in SS and adding the files that are now in that folder
(on my local system) to that project. I am assuming that the VS asp.net
project does understand where these files exist in SS after this, but I'm
not sure. Bottom line is, what do I need to do to properly deal with the
folder creation scenario I just described.

2) Now that I have the files in the subfolder in VS, when I run the project
I'm getting URL problems. For example, I do a redirect in my custom base
page (the page that all my cs files inherit from - it inherits from the Page
class) and the redirect now doesn't work because, of course, the web server
is trying to find the aspx file (that I'm trying to redirect to) in the
subfolder. I tried adding a forward slash thinking that would fix it by
having the web server search from the root to find the correct file, but
that didn't work. Any ideas on how to deal with this situation.

I've read previously that it is a good idea to keep everything in one folder
for an asp.net app. If that is the case, I'll gladly undo everything. It
appears this could turn out to be more trouble than it is worth. Any help
would be much appreciated.

Thanks!
Nov 19 '05 #1
1 1447
epigram wrote:
We've got an existing asp.net project (using visual studio 2003) and have
several aspx pages in the project. We've decided that there are going to be
a lot of related aspx pages that we'd like to have in a subfolder for
organizational reasons. So, I created the new folder in the project and
"dragged" the aspx file (along with the cs and resx files) into this new
folder. Since the project was under source control VS warned me about doing
this and something to the effect of the solution wouldn't remember these
files. I'm now faced with two questions/issues:

1) I'm hoping that I can deal with the SourceSafe issues by simply creating
a subfolder/project in SS and adding the files that are now in that folder
(on my local system) to that project. I am assuming that the VS asp.net
project does understand where these files exist in SS after this, but I'm
not sure. Bottom line is, what do I need to do to properly deal with the
folder creation scenario I just described.

2) Now that I have the files in the subfolder in VS, when I run the project
I'm getting URL problems. For example, I do a redirect in my custom base
page (the page that all my cs files inherit from - it inherits from the Page
class) and the redirect now doesn't work because, of course, the web server
is trying to find the aspx file (that I'm trying to redirect to) in the
subfolder. I tried adding a forward slash thinking that would fix it by
having the web server search from the root to find the correct file, but
that didn't work. Any ideas on how to deal with this situation.

I've read previously that it is a good idea to keep everything in one folder
for an asp.net app. If that is the case, I'll gladly undo everything. It
appears this could turn out to be more trouble than it is worth. Any help
would be much appreciated.

Thanks!

Keeping everything in one folder is not necessarily a good design at
all, nor is it a bad one; it's all preference and how big your app is.

When you move the files, essentially all it is saying is that 'VSS is
not going to delete the files in the old location; and you will lose all
history, etc.', if I remember right. After you checkin after this
warning, you'll notice VSS will have created the new folder, and put the
files in there. But if you go back to your root folder in VSS for your
app, you'll notice the copies are still there as well, and possibly
checked out to you. One option is just delete the old files in the old
location in VSS.

Now, remember, you do lose all history if I remember correctly in those
files, as you (er, VS.NET) essentially created a new set of files which
happened to be a copy of the one in the original location. You could
try, after checking in as noted above, go into VSS, delete the files in
the new subdirectory, and then Move the old ones to the new location in
VSS. When done, VS.NET doesn't care, it just looks in whatever file/VSS
locations it has in its file mappings; do a get latest after all this to
verify.

BTW, VS 2005 cleans this process up immensely...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2

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

Similar topics

1
by: Kris | last post by:
Question: How do you create an Installer program using the Package and Deployment Wizard provided by Visual Studio Pro 6.0 (SP5) to include subfolders and their contents. I understand how to...
9
by: Tom | last post by:
How do you programatically get a list of subfolders in a folder? Thanks! Tom
3
by: TK | last post by:
Excuse me for multiple posting because I've posted this message to aspnet.security NG but have not got any response yet. I'm building an ASP.NET application works in Forms Authentication mode...
9
by: Bill Nguyen | last post by:
I need a VB routine to loop thru a select top folder to find all subfolders and list all subfolders/files under each of these subfolders. Any help is greatly appreciated. Bill
5
by: Robertico | last post by:
Is it possible to upload a complete folder including the subfolders using PHP ? Regards, Robertico
3
by: rdemyan via AccessMonster.com | last post by:
How do I get the names of the task subfolders from Outlook? Also, when I right click on the "Tasks" folder in Outlook, I don't have the option to rename it. So, can I assume that this folder name...
2
by: Tatyana | last post by:
Hello, I was wondering if anybody know how to fix the problem with JavaScript in subfolders. I have the following in <body>
0
by: grant | last post by:
Has anyone got a sample db that has a form to list an Outlook inbox and subfolders? I want to be able to mimic the tree style list of folders in Outlook so the user can browse the contents on...
9
by: OWeb | last post by:
Javascript and recursing subfolders assistance ------------------------- I have this script that is a free extra download from SlideShowPro. It's a great script but I feel it needs to be...
2
by: pbrown | last post by:
Hey All, My problem appears to be pretty simple. I need a way of listing all the folders that exist in a certain directory. By all the folders, I mean ALL the folders; any file folder that exists...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...

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.