I am using ASP.net MVC with the razor engine.
I have a page with a button, when the button is clicked i call an ActionResult
in my controller using Ajax. The Ajax call:
$.ajax({
type: "GET",
url: "/Home/Review",
success: function (data) {
//alert("yay");
}
});
My ActionResult
method is hit fine, however it does not load the view speified.
The code:
public ActionResult Review()
{
return View();
}
The current view is Index.cshtml
when Review() is hit i would like Review.cshtml
to be rendered on screen. (It should be rendered as a full view, not as partial view inside Index.cshtml)
I have tried - return View("Review");
return View("Review.cshtml");
return View("..\Views\Home\Review.cshtml);
I can't use - tml.BeginForm("Action", "Controller", FormMethod.Post);
(see my other question MVC submit button not firing)