Routing with command controller and sub controllers without using areas
Posted
by user205258
on Stack Overflow
See other posts from Stack Overflow
or by user205258
Published on 2010-04-11T01:19:53Z
Indexed on
2010/04/11
1:23 UTC
Read the original article
Hit count: 465
How can I create a routing structure for a project management application where there are discrete controllers for all the relevant pieces such as TaskController, DocumentController etc and an Over arching controller. I would essentially like a structure like:
http://server/Project/123/Task http://server/Project/123/Document
I am using mvc1 so I have no access to areas etc. The project section will have a separate master page for project controllers such as task, document etc with a dfferent menu navigaton. I have tried three routes together n Global.asax like:
routes.MapRoute(
"Task",
"Project/{id}/Task/{action}",
new { controller = "Task", action = "Index", id = "" }
);
routes.MapRoute(
"Message",
"Project/{id}/Message/{action}",
new { controller = "Message", action = "Index", id = "" }
);
routes.MapRoute(
"Document",
"Project/{id}/Document/{action}",
new { controller = "Document", action = "Index", id = "" }
);
What am I doing wrong here
© Stack Overflow or respective owner