I have the following URL
/ vlog / usertimeline /? slug = tests
for the Vlog controller, action usertimeline and slug parameter. How do I set the route to be
/ vlog / usertimeline / tests
I'm using MVC 4.
I have the following routes configured:
routes.MapRoute(
"PubServices",
"PubServices/{action}",
new { controller = "PubServices", action = "Index" });
routes.MapRoute(
"MailsJson",
"MailsJson/{action}",
new { controller = "MailsJson", action = "Index" });
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
routes.MapRoute(
"Company", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Company", action = "Index", id = "" } // Parameter defaults
);
routes.MapRoute(
"RecoverPasswordFinish",
"Account/RecoverPasswordFinish/{username}/{hash}",
new { Controller = "AccountWF", action = "RecoverPasswordFinish" }
);
routes.MapRoute(
"EmailConfirmation",
"AccountWF/EmailConfirmation/{username}/{userid}",
new { Controller = "AccountWF", action = "EmailConfirmation" }
);
routes.MapRoute(
"UnsubscribeBulkEmail",
"Mails/UnsubscribeBulkEmail/{id}",
new { Controller = "Mails", action = "UnsubscribeBulkEmail", id = "" }
);
routes.MapRoute(
"VlogTimeline",
"Vlog/Timeline/{slug}",
new { controller = "Vlog", action = "Timeline", slug = "" }
);