Redirect to View in another structure

3

I have a project, which is in an area, in it, my main controller, has an action that, when called, should return a view that is in another folder, but within the same area.

return View("OutraPasta/Index.cshtml");

return View("~/Views/OutraPasta/Index.cshtml");

return View("~/Views/Area/OutraPasta/Index.cshtml");

But none of the options actually returns that view.

    
asked by anonymous 27.03.2017 / 22:08

1 answer

4

No mystery, just use the full view path.

return View("~/Areas/NomeDaArea/Views/NomeDaView.cshtml")
    
27.03.2017 / 22:16