Different folders for aspx and codebehind files

N

Nelson Hsu

I'd like to further discuss this thread:

"code behind problems in vs.net 2003"
http://groups.google.com/groups?hl=...ory&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=20&sa=N

It seems like I can no longer reply to it so I figured I'd just put up
a new post to it.

According to Jiange Sun, you're supposed to put a page and its
codebehind file in the same directory because it's "part of a page
entity". However, how would you make sure that in a version control
system, that the graphic guys have only access to the aspx pages? If
you add your directory to a repository, when a graphic guy wants to
change the code to an aspx page, he or she will also be downloading
your codebehind pages.
 
N

Natty Gur

Hi,

I didn't read the thread. I know several organizations that split ASPX
and code behind files to separate folders mainly for the reason that you
mention. I don't see any problems regarding this mode of Project file
arranging. Eventually, code behind files will be compiled into single
DLL and ASPX files into assemblies.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
N

Nelson Hsu

Thanks for replying. I've been trying for some time to arrange the
files the way I want in Visual Studio, but the problem is that VS.net
links the aspx page to the code page using a Codebehind attribute in
the @Page directive. This codebehind attribute only allows you to
specify a filename and not a path. Thus, I've been unable to put the
codebehind page in a different directory..

Nelson
 
N

Natty Gur

yes, the VS designer cant load *CS file from other floder but the
project compiling and running properly. it dosent need to bother you
since GUI persone handle ASPX files and Programmers *.CS. if you set
your codebehind to /classes/mypage.aspx.cs VS will always start with *cs
files in classes folder and application folder but will use just files
under classes folder.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top