Reputation: 458
SCENARIO: A developer at work has created an three-tier ASP.NET Web Application which plugs into the company website, however the rest of the site was done as an ASP.NET Website. For clearity, his portion used Web Application (compiled into single .dll) and the rest of the site is WebSite (seperate .dlls). I do not wish to recompile the website every time a change is made to a page.
QUESTION: Is it possible to convert a Web Application to a Website without rewriting the entire application?
TRIED:
Upvotes: 2
Views: 4249
Reputation: 85625
Ok - assuming you have a backup, this is how I would tackle it:
designer.cs
files*.cs
files that aren't code behinds (eg., .ascx.cs
or .aspx.cs
) and move them into the App_Code folderCodeBehind=
to CodeFile=
in any .aspx
or .ascx
filesThere's some potential complications around Global.asax, ASHX handlers (need to be inline) and referencing pages and controls. You'll have to deal with those manually, I'm afraid - but if it's a smallish effort, it should be easily doable.
Upvotes: 7