LengthRouteConstraint Class

Definition

Constrains a route parameter to be a string of a given length or within a given range of lengths.

public class LengthRouteConstraint : System.Web.Routing.IRouteConstraint
type LengthRouteConstraint = class
    interface IRouteConstraint
Public Class LengthRouteConstraint
Implements IRouteConstraint
Inheritance
LengthRouteConstraint
Implements

Constructors

LengthRouteConstraint(Int32)
LengthRouteConstraint(Int32, Int32)

Initializes a new instance of the LengthRouteConstraint class that constrains a route parameter to be a string of a given length.

Properties

Length

Gets the length of the route parameter, if one is set.

MaxLength

Gets the maximum length of the route parameter, if one is set.

MinLength

Gets the minimum length of the route parameter, if one is set.

Methods

Match(HttpContextBase, Route, String, RouteValueDictionary, RouteDirection)

Applies to