liveBook · Manning

TempData

TempData is an ASP.NET Core temporary-data dictionary for storing values across requests, commonly through cookies.

How 2 Manning books explain it

Pro ASP.NET Core 7, Tenth Edition

The TempData property exposes the controller or Razor view's temporary request-to-request data dictionary.

How it is used
Carries temporary values across a redirect so the next controller view or Razor Page can display them.
How deep it goes
Explains dictionary writes, view reads, storage choice, and deletion timing through a worked redirect; it does not detail storage configuration.
Examples
Uses a cube-result form, redirected form-results tables, and a related-data creation flow that preserves an unfinished edit.
What you can do after
Apply it via ASP.NET Core TempData to pass simple or serialized values to a redirected view or page.

Read how Pro ASP.NET Core 7, Tenth Edition explains TempData →

ASP.NET Core in Action, 3e

TempData is an ASP.NET Core temporary-data mechanism that stores small values for retrieval during a subsequent request, commonly using cookies.

How it is used
Carries small, short-lived values through a redirect, especially in the POST-REDIRECT-GET pattern.
How deep it goes
Defines dictionary behavior, request lifetime, default storage, and alternatives but does not provide implementation code.
Examples
Uses an e-commerce checkout redirect and contrasts TempData with PageModel properties and ViewData.
What you can do after
Apply it via ASP.NET Core's TempData mechanism when a redirect must carry a small temporary value.

Read how ASP.NET Core in Action, 3e explains TempData →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.