I’ve a very basic ASP.NET MVC application that uses the default routing. Now I need to route all the requests that comes with out a specific URL to one action with a single parameter.
Examples:
should be routed to the same action:
public ActionResult ViewById(int id)
Thanks,
Eden
Just define the route without {controller}/{action} part
The last parameter is constraint, which makes sure that the id is a number.