New to Telerik UI for ASP.NET Core? Start a free 30-day trial
Navigate Through Pages using Menu Component
Environment
Product Version | 2025.1.227 |
Product | Menu for Progress® Telerik® UI for ASP.NET Core |
Description
How can I configure the Telerik UI for Telerik UI for ASP.NET Core Menu to navigate through different pages of my application?
Solution
The Menu component renders anchor elements (<a>
) by default.
To navigate to the application pages, configure each item using the Url()
or Action()
methods.
Index.cshtml
@(Html.Kendo().Menu()
.Name("menu")
.Items(menu =>
{
menu.Add().Text("Home").Url(Url.Action("Index", "Home"));
menu.Add().Text("About").Url(Url.Action("About", "Home"));
menu.Add().Text("Contact").Url(Url.Action("Contact", "Home"));
})
)