RouteValueAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An attribute which specifies a required route value for an action or controller.
When placed on an action, the route data of a request must match the expectations of the required route data in order for the action to be selected. All other actions without a route value for the given key cannot be selected unless the route data of the request does omits a value matching the key. See IRouteValueProvider for more details and examples.
When placed on a controller, unless overridden by the action, the constraint applies to all actions defined by the controller.
public ref class RouteValueAttribute abstract : Attribute, Microsoft::AspNetCore::Mvc::Routing::IRouteValueProvider
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public abstract class RouteValueAttribute : Attribute, Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type RouteValueAttribute = class
inherit Attribute
interface IRouteValueProvider
Public MustInherit Class RouteValueAttribute
Inherits Attribute
Implements IRouteValueProvider
- Inheritance
-
RouteValueAttribute
- Derived
- Attributes
- Implements
Constructors
RouteValueAttribute(String, String) |
Creates a new RouteValueAttribute. |
Properties
RouteKey |
The route value key. |
RouteValue |
The route value. If |