MVC Integration in WebForms

According to http://www.codeproject.com/Articles/38778/ASP-NET-WebForms-and-ASP-NET-MVC-in-Harmony

I made changes to the WebForms project:

  • Added System.Web.Mvc.dll
  • Added System.Web.Abstractions.dll
  • Created Controllers and View Folder
  • Added these assemblies in the debug section
  • Added MVC, MVC.Ajax, MVC.HTML to my pages-> namespaces
  • Added Web.Routing.UrlRoutingModule as an HttpModule
  • Registered Test Route

But in the section “Getting Visual Studio to propose MVC elements” I don’t have the option “Unload the project”, and also I don’t have a csproj file. I only have .sln and .sln.DotSettings.user

I can add a view, but not a controller, why, any suggestion? http://prntscr.com/94imo

+3
source share
1 answer

Since you wrote that you do not have a csproj file, I assume that you have a WebForms website and not a WebApplication project.

I quickly looked through the tutorial in which you posted the link and it doesn't seem to mention this step, but when I last converted the WebForms website to MVC WebApplication (admittedly, that was a long time ago), I had first convert it to a WebForms WebApplication project.

+3
source

All Articles