Web Application vs Website Project

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.
 
B

bruce barker

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top