I'm making a blog in mvc 4 and trying make a route .
Here is how it looks now:
/About/Index
But I'd like it to look like:
/About/Firstname-Lastname
The firstname and lastname is always the same; it's not supposed to be dynamic. Here is what I have so far. I know it is because it needs to know what view show. So is there a way to say if /About/Firstname-Lastname then show Index?
routes.MapRoute(
name: "About",
url: "{controller}/{name}/",
defaults:
new
{
controler = "About",
action = UrlParameter.Optional,
name = "firstname-Lastname"
}
);