PageModelAttribute Class

Definition

An attribute for base classes for page models. Applying this attribute to a type marks all subclasses of that type as page model types.

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

Constructors

Applies to

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