I have a project in ASP.NET and I am thinking of starting a progressive migration of the project to ASP.NET MVC, I installed the MVC references through Nuget and created an area to work there.
Now the question is:
- Is it enough to install the MVC references through Nuget?
- How do you call an ASP.NET MVC controller action from ASP.NET?
No, you have to make several modifications to your web project. To make a "hybrid" you can read:
The way to redirect from one page to another in ASP.NET is by using the
HttpResponse.Redirect
. To be able to invoke an action of a controller, it would only be to perform, for example:From code behind:
From the form:
Remember that with
Action
is looking to generate a Url of the formRecepcionCta/Index?Area=Area&id=1
.Reference: