I am trying to figure out how to route my application to a default controller/task/id when none is specified in a request.
Here is my one routing instruction...
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new
{
controller = "LML",
action = "TaskLibrary",
id = 7
//id = UrlParameter.Optional
} // Parameter defaults
);
Using this, if I enter in 'http://mywebsite/', the proper controller/action/id is called. However, I would like the URL to reflect this. Rather the URL remains untouched from what I entered.
Using routing, is there a way to affect the URL so that it redisplays synced with the controller/action/id it is showing by default? Or do I have to create some sort of redirect action?