Hi,I have something like this in my _LayoutStandard.html for an ASP.NET MVC5 site:
@(Html.Kendo().Menu().Name("tdtMenu").Items(lvl1 =>
{
lvl1.Add()
.ImageUrl(Url.Content("~/Content/Images/tools.png"))
.Items(lvl2 =>
{
lvl2.Add().Text("Server info").Action("About", "Foo");
lvl2.Add().Text("Change my password").Action("Manage", "Account");
lvl2.Add().Text("Administration").Action("Index", "Admin");
lvl2.Add().Text("Testpages").Items(lvl3 =>
{
lvl3.Add().Text("Testpage - Fitting").Action("FittingTest", "Fitting");
lvl3.Add().Text("Testpage - SignalR").Action("Index", "Foo");
lvl3.Add().Text("Testpage - Obsolete").Action("Project", "Overview");
});
lvl2.Add().Text("Projects").Action("Overview", "Project");
});
}).Events(e => e.Select("TDT.MenuSelect")))
lvl1.Add()
.ImageUrl(Url.Content("~/Content/Images/tools.png"))
.Items(lvl2 =>
{
lvl2.Add().Text("Server info").Action("About", "Foo");
lvl2.Add().Text("Change my password").Action("Manage", "Account");
lvl2.Add().Text("Administration").Action("Index", "Admin");
lvl2.Add().Text("Testpages").Items(lvl3 =>
{
lvl3.Add().Text("Testpage - Fitting").Action("FittingTest", "Fitting");
lvl3.Add().Text("Testpage - SignalR").Action("Index", "Foo");
lvl3.Add().Text("Testpage - Obsolete").Action("Project", "Overview");
});
lvl2.Add().Text("Projects").Action("Overview", "Project");
});
}).Events(e => e.Select("TDT.MenuSelect")))
I have noticed, that the Action() calls lead to calling the controller constructors. Why is that? Isn't that a performance issue?
Thank you for more information on this!