---
title: TempDataExtensions
summary: API reference for TempDataExtensions.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-09-17
library: SAIF.Framework.Web.Mvc
reference_type: package
---

# TempDataExtensions

Small helper pair around the `WebContextId` TempData key, sparing callers from repeating the key literal and cast when checking for or reading a context id carried across a redirect.

## Purpose
- Small helper pair around the `WebContextId` TempData key, sparing callers from repeating the key literal and cast when checking for or reading a context id carried across a redirect.

## Context
- Namespace: `SAIF.Web.Mvc`
- Assembly/package: `SAIF.Framework.Web.Mvc (source-shipping NuGet package)`
- Kind: static class

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| ContainsWebContextId(TempDataDictionary) | `public static bool ContainsWebContextId(this TempDataDictionary tempData)` | Returns whether TempData currently carries a `WebContextId` entry; consumed by [OP-01](../../operations/op-01-resolve-web-context.md) step 2. |
| WebContextId(TempDataDictionary) | `public static string WebContextId(this TempDataDictionary tempData)` | Reads the `WebContextId` value out of TempData. |

## Sources
- `src/Web.Mvc/Extensions/TempDataExtensions.cs`
