Call a controller from a view that belongs to another controller

0

I created a project in VS 2017 with Scaffolding (CRUD) has created the views. But now how can I call the CRUD driver within the project that VS creates by default,

I put the name of the driver in the URL and it works, but I need to call it a button or a link.

This is the typical project generated by VS. making use of the home controller. but within this view, is it possible to call another controller?

    
asked by Ashley G. 06.04.2018 в 00:48
source

1 answer

1

You can use an ActionLink overload

 @Html.ActionLink("Texto del Link","Acción","Controlador",null,null)

I clarify that the first of the null refers to an object of type routValues in case you have to pass some parameter, and the second to an object htmlAttributes if you want to handle the finest your html

Greetings

    
answered by 06.04.2018 / 13:19
source