To say that routing is not my strong suite is an understatement, so please bear with me.
I have this link in one of my pages and I need my MVC route to pick this up and map it to the
"MyArea" area "MessagesController" controller "Inbox" method
http://localhost/MyArea/messages/list.asp?pjid=&box=in&sf=mesibox
What I've come up with so far does not cut it.
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("favicon.ico");
routes.MapRoute(
"Messages",
"messages/list.asp",
new
{
controller = "Messages",
action = "Inbox"
});
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new
{
controller = "Account",
action = "LogOn",
id = UrlParameter.Optional
}
);
Any help would be appreciated.
Thank you, Stephen
UPDATE: Darin answered a similar question here How to route legacy QueryString parameters in ASP.Net MVC 3? so that takes care of the query string parameters. Now to figure out the main segments.