I just basically need to redirect from one page (Page 1) to another page (Page 2).
Here's my view - Page 1:
@Html.ActionLink("Reviews", "MyActionStuff", "MyController", null, null)
Here's my controller:
public class MyController : Controller
{
public ActionResult MyActionStuff()
{
return View(View("~/Views/Shared/MyViewFolder/MyView.cshtml", myModel);)
}
}
My destination view - Page 2 - MyView.cshtml:
@model My.Models.SomeModel
// display model attributes.
I'm not really sure why as simple as having a link using @Html.ActionLink doesn't work.
I did try to debug and it appears it's not even invoking my controller - it just goes to 404 error.
I tried to use @Url.Action but I got the same thing.
I followed / patterned my Html.Action link from here but still the same issue.
the culprit is the naming convention, I had to remove the 'controller' suffix when calling it >: