ViewDataAttribute Classe

Definição

As propriedades decoradas com ViewDataAttribute terão seus valores armazenados e carregados do ViewDataDictionary. ViewDataDictionary tem suporte em propriedades de Controladores e manipuladores razor page.

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
Herança
ViewDataAttribute
Atributos

Construtores

ViewDataAttribute()

As propriedades decoradas com ViewDataAttribute terão seus valores armazenados e carregados do ViewDataDictionary. ViewDataDictionary tem suporte em propriedades de Controladores e manipuladores razor page.

Propriedades

Key

Obtém ou define a chave usada para obter ou adicionar a propriedade do valor de ViewDataDictionary. Quando não especificado, a chave é o nome da propriedade.

Aplica-se a