FromRouteAttribute Class

Specifies that a parameter or property should be bound using route-data from the current request.

Namespace
Microsoft.AspNetCore.Mvc
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class FromRouteAttribute : Attribute, _Attribute, IBindingSourceMetadata, IModelNameProvider
class Microsoft.AspNetCore.Mvc.FromRouteAttribute

Properties

Microsoft.AspNetCore.Mvc.FromRouteAttribute.BindingSource
Return type:Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource
public BindingSource BindingSource { get; }
Microsoft.AspNetCore.Mvc.FromRouteAttribute.Name
Return type:System.String
public string Name { get; set; }