ViewDataAttribute
ViewDataAttribute
ViewDataAttribute
ViewDataAttribute
Class
Definition
Properties decorated with ViewDataAttribute will have their values stored in and loaded from the ViewDataDictionary. ViewDataDictionary is supported on properties of Controllers, and Razor Page handlers.
public ref class ViewDataAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class ViewDataAttribute : Attribute
type ViewDataAttribute = class
inherit Attribute
Public NotInheritable Class ViewDataAttribute
Inherits Attribute
- Inheritance
- Attributes
Constructors
ViewDataAttribute() ViewDataAttribute() ViewDataAttribute() ViewDataAttribute() |
Properties
Key Key Key Key |
Gets or sets the key used to get or add the property from value from ViewDataDictionary. When unspecified, the key is the property name. |