The error that I get is this (no more info) : System.StackOverflowException
Everything in my project is working fine but as soon as I post a data and after that, it should return view I get that error
and in my layout as soon as I remove the
part it working fine
@Html.Action("TuorMenu", "Home", new { area = "Site" })
simplify layout
@{
Layout = null;
}
<!DOCTYPE html>
html dir="rtl" lang="fa">
<head>
</head>
<body>
@Html.Action("TuorMenu", "Home", new { area = "Site" })
@RenderBody()
</body>
</html>
and the partial created like this
[HttpGet]
[OutputCache(Duration = 86400, VaryByParam = "none")]
[ChildActionOnly]
public ActionResult TuorMenu()
{
MenuViewModel vmg = new MenuViewModel();
vmg.TourGroup = _repoTourGroup.Where(p => p.Id != 15).ToList();
//vmg.BlogGroup = _repoBlogGroup.Select();
return PartialView("_TuorMenu", vmg);
}
...
@model test.ViewModels.Home.MenuViewModel
@{
Layout = null;
}
.......loading menu
I don't know is there anything wrong with the loading partial view or its just problem with returning view after HttpPost be its just forking fin in other pages but get that error when I try to access a view with a form HTTP post action
and about the HttpPost, let assume that there is view "A" that had the Form that is HttpPost and after that fires, we should get the created view BUT it just returns the above error