0

I have been assigned to change a section in an existing ASP.NET website. The requirement is to use ASP.NET MVC for that section. We are thinking to divide it in different modules where some of them will be in ASP.MVC and the others with remain the same for some time, until we have time to change the whole website into ASP.NET MVC application.

  • Does anybody have any idea which is the best way to combine both of them in a way that the different sections will be in MVC and some in simple ASP.NET ?

  • Secondly if anybody has any idea how to solve routing problems to redirect from ASP.NET --> MVC part and vice verca ?

Rey
  • 3,663
  • 3
  • 32
  • 55
  • ASP.NET MVC is part of ASP.NET already. Perhaps you are confusing Web Forms with ASP.NET? – mason Jan 25 '17 at 18:29
  • See also: http://stackoverflow.com/q/532227/654031 – Chris Pratt Jan 25 '17 at 18:32
  • yes exactly, I am talking for webforms. I googled the question but did not find it. So I will check it and let you know if I have anything to add... Thanks for the answer – Rey Jan 25 '17 at 18:33
  • I am not setting it to work yet, and I dont know where is the problem. Here is what I did: Installed MVC 4 from nuget `Install-Package Microsoft.AspNet.Mvc -Version 4.0.30506` since the project is .NET 4. After that I created two folders Controllers and Views. And then added the RegisterRoutes method where I registered my controller, but when i buld it it does not get hit and furthermore it shows me `HTTP 404 error: The resource cannot be found.` I think it is looking for .aspx file and does not find it. When run it in debug mode the breakpoints are not hit showing 'No symbol has been loaded.' – Rey Jan 26 '17 at 11:50
  • Hi guys, I just found the problem. The controller folder needs to be placed in `App_Code folder`. I dont know why! – Rey Jan 26 '17 at 14:23

0 Answers0