I want to Render Index()
action off my Area (named Menu) in Layout Page of my main MVC project by this code
and got Error on this line of layout
@{Html.RenderAction("Index", "Menu", new { area = "" }); }
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
and this is my AreaRegistration Code just for inform:
public override string AreaName
{
get
{
return "Menu";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Menu_default",
"Menu/{controller}/{action}/{id}",
new { controller = "Menu", action = "Index", id = UrlParameter.Optional },
new string[] { "Menu.Controllers" }
);
}
as you see my controller name is Menu
Edited: the main reason of my problem is this ...Index action off my area cant return his view ...i was set one break point in Index action, and one break point inside of Index view ... and the program is reaching and stop on first one,but never stops in second one!! ... So the main problem is this ...Index action of my area doesn't return Index view..