TempDataDictionary.Keep Method

 

Marks keys in the dictionary for retention.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Overload List

Name Description
System_CAPS_pubmethod Keep()

Marks all keys in the dictionary for retention.

System_CAPS_pubmethod Keep(String)

Marks the specified key in the dictionary for retention.

Remarks

When a key is marked for retention, the key is retained for the next request.

See Also

TempDataDictionary Class
System.Web.Mvc Namespace

Return to top

TempDataDictionary.Keep Method ()

Marks all keys in the dictionary for retention.

Syntax

public void Keep()
public:
void Keep()
member Keep : unit -> unit
Public Sub Keep

Remarks

When a key is marked for retention, the key is retained for the next request. The RedirectToAction method calls the Keep method, which specifies that all data is retained for the next request.

Return to top

TempDataDictionary.Keep Method (String)

Marks the specified key in the dictionary for retention.

Syntax

public void Keep(
    string key
)
public:
void Keep(
    String^ key
)
member Keep : 
        key:string -> unit
Public Sub Keep (
    key As String
)

Parameters

Remarks

When a key is marked for retention, the key is retained for the next request.

Return to top