Hi Team
I have _SidebarMenuLayout, but i want to find a way to route to another controller not home( I have another unique controller name.).
- //_SideBarMenuLayout.cshtml
- class="sidebar-wrapper">
- "accordion"
class="link">class="fa fas fa-user-alt">Accountsclass="fa fa-chevron-down">- class
- "@Url.RouteUrl("
SuperAdmin")">SuperAdmin- "#"
>User-Account- // Route.config
- // Route to SuperAdmin
- routes.MapRoute(
- name:"SuperAdmin",
- url:"administrator/",
- defaults:new {controller= "Home", action= "SuperAdmin", url = UrlParameter.Optional}
- );
- // How to call this controller inside _SideBarMenuLayout.cshtml?
- // Rooute to AddtoCart.
- routes.MapRoute(
- name: "eNtsaPaymentOrders/",
- url:"add-to-card",
- defaults:new {controller = "eNtsaAddToCard", action = "eNtsaPaymentOrders", id = UrlParameter.Optional }
- );
5 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Guest UserPosted Dec 2, 2020, 5:45 AM
class
="submenu">Guest UserPosted Dec 2, 2020, 5:16 AM
Sachin SinghPosted Dec 1, 2020, 8:06 AM
Guest UserPosted Dec 1, 2020, 7:44 AM
class="submenu">
Sachin SinghPosted Dec 1, 2020, 7:07 AM