RouteAttribute Class

Definition

Indicates that the associated component should match the specified route template pattern.

C#
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=false)]
public sealed class RouteAttribute : Attribute
Inheritance
RouteAttribute
Attributes

Constructors

RouteAttribute(String)

Constructs an instance of RouteAttribute.

Properties

Template

Gets the route template.

Applies to

Product Versions
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0