TempDataAttribute Class

Definition

Properties decorated with TempDataAttribute will have their values stored in and loaded from the ITempDataDictionary. TempDataAttribute is supported on properties of Controllers, Razor Pages, and Razor Page Models.

public ref class TempDataAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class TempDataAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type TempDataAttribute = class
    inherit Attribute
Public NotInheritable Class TempDataAttribute
Inherits Attribute
Inheritance
TempDataAttribute
Attributes

Constructors

TempDataAttribute()

Properties

Key

Gets or sets the key used to get or add the property from value from ITempDataDictionary. When unspecified, the key is derived from the property name.

Applies to