TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
2.1k
472.6k
Routing pages to allow any controller except home
Dec 1 2020 6:49 AM
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
<!--Dashboard side bar menu-->
<div
class
=
"sidebar-wrapper"
>
<ul id=
"accordion"
class
=
"accordion"
>
<li>
<!--Adding some submenu
for
accounts-->
<div
class
=
"link"
><i
class
=
"fa fas fa-user-alt"
></i>Accounts<i
class
=
"fa fa-chevron-down"
></i></div>
<ul
class
=
"submenu"
>
<li><a href=
"@Url.RouteUrl("
SuperAdmin
")"
>SuperAdmin</a></li>
<li><a href=
"#"
>User-Account</a></li>
</ul>
// 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 }
);
Reply
Answers (
5
)
I have a checkboxlist and i want to select multiple on binddata
Jquery to load page automatically