ViewDataAttribute Clase

Definición

Las propiedades que ViewDataAttribute se decoran con tendrán sus valores almacenados en y cargados desde ViewDataDictionary . ViewDataDictionary se admite en las propiedades de controladores y controladores de página de Razor.

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
Herencia
ViewDataAttribute
Atributos

Constructores

ViewDataAttribute()

Propiedades

Key

Obtiene o establece la clave utilizada para obtener o agregar la propiedad a partir del valor de ViewDataDictionary . Cuando no se especifica, la clave es el nombre de propiedad.

Se aplica a