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.
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.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
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.