web application projects still create one dll per page. the difference
is that visual studio compiles the codebehind files into one dll, then
call the asp_compiler to build a dll per page, referencing the dll. so
web application actually end up with one more dll than web sites.
the practical difference is for web applications a project file is
maintained by visual studio (to compile the codebehind files) and
because the codebehinds are in one dll, they implicitly have a reference
to each other.
in a web site the pages are independent and if a page references another
page the proper way (as good coding would require anyway) is to
implement an interface in the app_code dir, then have the page implement
the interface. to call methods on another page, you cast it the known
interface. this turned out to be too complicated for causal coders, so
web application projects were added to asp.net 2.0.
i'd recommend you use web sites instead of web applications, as its a
cleaner approach.
-- bruce (sqlwork.com)
Mark Fitzpatrick wrote:
Two completely different types of project. The first creates a Web Site
Project. The second created a Web Application Project.
The main difference is the web site project does not compile into a single
dll, it creates many dlls, one for each page or directory.
The Web Application Project compiles all the code in the project into a
single dlls. The Web Application Project behaves more like the one that
shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
and later integrated into SP1 because a large number of developers didn't
like the new Web Site Project.