Web Application vs Website Project

  • Thread starter Thread starter chint
  • Start date Start date
C

chint

In VS there are two way to make asp.net pages, Web Application vs. Website
Project. but whats the difference between Web Application vs. Website.

also how to set pages to use inline code always instead of code behind, in a
website project VS seems always add code behind pages.

thanks for ur help.
 
google this newsgroup for more info and arguments over which is better.

generally, the web application builds the codebehind file into one dll,
and page inherit from their codebehind class. web sites, compile the
page and its code behind (if one) into one class via partial classes.

in web application, any global declared in a code behind, can be
referenced by any other page as the code behinds are built into one
assembly. also to access form controls from the codebehind, vs builds a
partial class where the controls as declared as protected (designer.cs).
in a web site the page can see privates in the codebehind so no designer
class is required (also findcontrol is required less).

both web applications and websites can be complied into a single dll for
deployment via aspnet_merge utility.

to not have vs create a codebehind file in a web site, when you first
create a page, uncheck "place code in seperate file". it will remember
this setting.

-- bruce
 
Back
Top