You should look into the Web Application Project.
http://webproject.scottgu.com/
Be aware, though, that there is currently a HUGE bug with web application
projects and web deployment projects specifically related to UserControls
which manifests itself in the dreaded CS0433 error.
There seems to be no patter to when / if this will happen - your app can
have been working for ages when suddenly it will stop and you will see
something like:
Compiler Error Message: CS0433: The type 'iss_proposal' exists in both
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\intranet\982f569e\da8b6663\assembly\dl3\37c9bf8f\a2199b8c_7af3c601\intranet.DLL'
and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\intranet\982f569e\da8b6663\assembly\dl3\e4bee18e\a092dc96_7af3c601\intranet_deploy.DLL'
Maybe your web application project will compile without error. Maybe your
web deployment project will compile without error. Sometimes the above error
happens on the deployment server only.
One fairly common way is to instantiate the class behind a UserControl. Of
course, MasterPages are user controls too, which is where the problem
started happening for me. E.g. your MasterPage might have a Label control
used as a heading which the ContentPages populate dynamically...
There's a whole slew of posts on the web about this (do a Google search)
with various suggested workarounds. However, none of these is guaranteed to
fix. Apparently, I'm reliably informed (though not officially!) that there
is a bug in the web application project compilation engine...
There are another couple of issues that I've reported to Scott Guthrie's
teamm and I'm still waiting for a resolution...
Web application projects and web deployment projects are IMO the greatest
add-ons to ASP.NET so far - however, I really get the feeling that they've
"done an Access 95" with these and released them before they're quite
finished...