convert web site to web app

J

John A Grandy

VS 2005 SP1

Has anyone converted an ASP.NET Web Site to an ASP.NET Web Application
Project ?

Any pointers ?

Thanks.
 
B

bruce barker

besides creating the project file, you need to create the hacky designer
files so the code behind can access the aspx controls (he designer file
is a partial class that declares all controls as protected). probably
just editing each aspx file in the ide will create the designer files.

in some cases you will need to change control references to FindControl.
this is because in websites the codebehind is a true partial class,
while in a web application the codebehind is more of the inheritance
model. (see partial class rules for separate assemblies for more info)

-- bruce (sqlwork.com)
 
C

Cowboy \(Gregory A Beamer\)

Depending on the extent of the site, you can also create a new web app and
import existing. If the nesting is not too deep, this should not take much
time.

I generally try to keep as much app logic in libraries, so neither is an
advantage to me. Your mileage may vary.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top