Reputation: 5150
We currently have .net 3.5 using web form with code behind pages. Is it possible to add MVC functionality to this project to any existing pages?
What about new pages added to the project?
I assume the answer is no but maybe there is some creative ways out there.
Secondly. Do I have to do anything special to use Razor on these web form pages or does it come in the box with .net 3.5 +?
Upvotes: 0
Views: 183
Reputation: 17010
ASP.NET MVC and ASP.NET web forms will run side by side. You can then add new pages, either MVC views, or web forms, to the project. The linking is a bit different between the two, as the MVC will use friendly URLs out of the box and the web forms will not. You can use routing to link to web forms, as well, but be sure you are using a different enough routing you don't accidentally end up with both a web forms endpoint and an MVC view with the same route.
I dont' believe Razor works with .NET 3.5, but have not played with the idea to see if there is a way. I would personally consider determining if you can update, as there are benefits to 4.0 (and now 4.5, although it is better to use with Visual Studio 2013, which is not yet in wide release - RTM on MSDN).
Upvotes: 2