# Use the Same Controllers in Different Areas in the Menu Items

## Environment

<table>
 <tr>
  <td>Product</td>
  <td>Telerik UI for ASP.NET Core Menu</td>
 </tr>
 <tr>
  <td>Product Version</td>
  <td>Created with version 2024.4.1112</td>
 </tr>
</table>

## Description

How can I use the same Controllers in different Areas with the Telerik UI for ASP.NET Core Menu?

## Solution

```Razor HtmlHelper
    @(Html.Kendo().Menu()
              .Name("menu")
              .Items(menu =>
              {
                  menu.Add().Text("Home").Action("Index", "Home", new { area = "" });
                  menu.Add().Text("Area1").Action("Index", "Home", new { area = "ChartInGrid" });
                  menu.Add().Text("Area2").Action("Index", "Home", new { area = "GridSelectionByField" });
                  menu.Add().Text("Register").Action("Index", "Home", new { area = "EditorImportExport" }).ContentHtmlAttributes(new { id = "registerLink" });
              })
   )
```

```Razor TagHelper
    @addTagHelper *, Kendo.Mvc

    <kendo-menu name="menu">
        <items>
            <menu-item text="Home" asp-action="Index" asp-controller="Home" asp-route-area=""></menu-item>
            <menu-item text="Area1" asp-action="Index" asp-controller="Home" asp-route-area="ChartInGrid"></menu-item>
            <menu-item text="Area2" asp-action="Index" asp-controller="Home" asp-route-area="GridSelectionByField"></menu-item>
            <menu-item text="Register" asp-action="Index" asp-controller="Home" asp-route-area="EditorImportExport" id="registerLink"></menu-item>
        </items>
    </kendo-menu>
```

For the complete implementation of the suggested approach, refer to [the ASP.NET MVC project on how to use the same Controller in different Areas with the Menu component](https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/MenuSameControllersInDifferentAreas). You can use this as a starting point to configure the same setup in an ASP.NET Core project.

## More ASP.NET Core Menu Resources

* [ASP.NET Core Menu Documentation](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/navigation/menu/overview)

* [ASP.NET Core Menu Demos](https://demos.telerik.com/aspnet-core/menu)

* [ASP.NET Core Menu Product Page](https://www.telerik.com/aspnet-core-ui/menu)

* [Telerik UI for ASP.NET Core Video Onboarding Course (Free for trial users and license holders)](https://www.telerik.com/aspnet-core-ui/documentation/getting-started/video-onboarding)

* [Telerik UI for ASP.NET Core Forums](https://www.telerik.com/forums/aspnet-core-ui)

## See Also

* [Client-Side API Reference of the Menu for ASP.NET Core](https://docs.telerik.com/kendo-ui/api/ui/menu)

* [Server-Side API Reference of the Menu for ASP.NET Core](https://docs.telerik.com/aspnet-core/menu/api)

* [Server-Side TagHelper API Reference of the Menu for ASP.NET Core](https://docs.telerik.com/aspnet-core/api/taghelpers/menu)

* [Telerik UI for ASP.NET Core Breaking Changes](https://www.telerik.com/aspnet-core-ui/documentation/backwards-compatibility/2023-backwards-compatibility)

* [Telerik UI for ASP.NET Core Knowledge Base](https://docs.telerik.com/aspnet-core/knowledge-base)
