views:

51

answers:

1

Hi,

I have a route where I want to set a constraint on the "action" paramter. It has to be either "Car" or "Boat"

+2  A: 

I think this should do it.

route.MapRoute("CarOrBoat", "{controller}/{action}/{id}",
                new { id = 0 },
                new {action = @"Car|Boat" }
womp