Export (0) Print
Expand All

RouteValueDictionary Class

Represents a case-insensitive collection of key/value pairs that you use in various places in the routing framework, such as when you define the default values for a route or when you generate a URL that is based on a route.

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

[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class RouteValueDictionary : IDictionary<String^, Object^>, 
	ICollection<KeyValuePair<String^, Object^>>, IEnumerable<KeyValuePair<String^, Object^>>, 
	IEnumerable

The RouteValueDictionary class enables you to work with collections of key/value pairs that are required in order to use ASP.NET routing. You use the RouteValueDictionary object to define values for the Constraints, DataTokens, and Defaults properties. You also use a RouteValueDictionary object when you generate a URL by calling the GetVirtualPath method and passing a RouteValueDictionary object as a parameter.

Every key in a RouteValueDictionary object must be unique. The RouteValueDictionary class uses case-insensitive ordinal comparison. For more information, see OrdinalIgnoreCase. A key cannot be nullptr.

The following example shows how to create a Route object and how to set the Constraints, DataTokens, and Defaults properties.

No code example is currently available or this language may not be supported.

System::Object
  System.Web.Routing::RouteValueDictionary

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5 SP1

Community Additions

ADD
Show:
© 2014 Microsoft