I am creating a basic blog application just now, to view the data I just use the default route, i.e. -
routes.MapRoute
(
"Default",
"{controller}/{action}/{id}",
new { controller = "Blog", action = "Index", id = UrlParameter.Optional }
);
So, when you go to mysite.com/View/12, it displays a blog with id 12. I want to change the urls to look like this: mysite.com/View/2010/06/01/this -is- The-headline.
I could have a URL mapping like -
routes.MapRoute(
"View",
"View/{year}/{month}/{day}/{title}",
new { controller = "Blog", action = "View" }
);
Controller, , . , , URL-, , . URL-, , , URL-?
!