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.8k
RoutConfigure more than two routes or one is enough?
Feb 7 2020 7:09 AM
Hi Mates
I want to have two unique routes one being normal controller = Home, action = "Index"... . Is it possible to have a unique route within for example dashboard so that files dont get confused when loaded from the browser. My logic is as below;
namespace
ContentManagementSystem
{
public
class
RouteConfig
{
public
static
void
RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute(
"{resource}.axd/{*pathInfo}"
);
routes.MapRoute(
name:
"Default"
,
url:
"{controller}/{action}/{id}"
,
defaults:
new
{ controller =
"Home"
, action =
"Index"
, id = UrlParameter.Optional }
// I already have this working fine
defaults:
new
{ controller =
"Dashbaord"
, action =
"_Index"
, id = UrlParameter.Optional
// I want to have seperate, but unique route for this controller for actionResult
);
}
}
}
Reply
Answers (
2
)
GhostScript convert PDF to image
Autocomplete textbox Nothing Happen