Class PageParameterAttribute
Attribute used to decorate page parameters which will have their value bound using parameters present in the request path.
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class PageParameterAttribute : Attribute
- Inheritance
-
objectAttributePageParameterAttribute
- Extension Methods
Constructors
PageParameterAttribute(Type)
Use this constructor to bind the first parameter value on the way to the application root.
public PageParameterAttribute(Type binderType)
Parameters
binderType
Type
Exceptions
- InvalidOperationException
Thrown when
binderType
is not a subclass of the PageModelBinder<T> class.
PageParameterAttribute(Type, Type)
Use this constructor to bind the parameter value of the parametrizedPageType
.
public PageParameterAttribute(Type binderType, Type parametrizedPageType)
Parameters
binderType
TypeparametrizedPageType
Type
Exceptions
- InvalidOperationException
Thrown when
binderType
is not a subclass of the PageModelBinder<T> class orparametrizedPageType
does not implement the IPage interface.
Properties
BinderType
Type of the page model binder to be used. See PageModelBinder<T>.
public Type BinderType { get; }
Property Value
- Type
ParametrizedPageType
Type of the page which has the parameter value provided as its slug.
public Type ParametrizedPageType { get; }
Property Value
- Type