Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
is there any way to convert web application to web site ?
Posted

1 solution

Refer - Convert ASP.NET Web Application to ASP.NET WebSite[^]
Quote:
Ok - assuming you have a backup, this is how I would tackle it:

Delete the csproj file
From within Windows Explorer, delete any designer.cs files
Still in Explorer, create an App_Code folder at the root of the site
Find any *.cs files that aren't code behinds (eg., .ascx.cs or .aspx.cs) and move them into the App_Code folder
Open in Visual Studio as Web Site project
Verify .NET FX version
Change CodeBehind= to CodeFile= in any .aspx or .ascx files
Readd any 3rd party references
There'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.
 
Share this answer
 
Comments
Karthik_Mahalingam 10-Jan-14 8:49am    
Tadit, i want to ask you one thing,
how to get the answer link from stackoverflow site ?
i mean , by appending the answer link (#343434)with the url ?
Check, under ever answer, there is a share button on left side. Click on that.
It will give you the link to share.
Karthik_Mahalingam 10-Jan-14 8:59am    
:)Thanks Tadit.
Always welcome. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900