The two methods to add constraints to a route is
•Use regular expressions
•Use an object that implements IRouteConstraint Interface