ViewDataAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type ViewDataAttribute = class
inherit Attribute
Public NotInheritable Class ViewDataAttribute
Inherits Attribute
- Inheritance
-
ViewDataAttribute
- Attributes
Constructors
ViewDataAttribute() |
Properties
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. |