Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

OptionalRouteConstraint Class

 

Constrains a route by an inner constraint that doesn't fail when an optional parameter is set to its default value.

Namespace:   System.Web.Mvc.Routing.Constraints
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

System.Object
  System.Web.Mvc.Routing.Constraints.OptionalRouteConstraint

public class OptionalRouteConstraint : IRouteConstraint

NameDescription
System_CAPS_pubmethodOptionalRouteConstraint(IRouteConstraint)

Initializes a new instance of the OptionalRouteConstraint class.

NameDescription
System_CAPS_pubpropertyInnerConstraint

Gets the inner constraint to match if the parameter is not an optional parameter without a value.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2015 Microsoft