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

# WebContextExtensions

Bridges the web-context view model and the resolved `IWebContext` with the round-trip form used to carry context id/value between requests, and the TempData hand-off used for same-application navigation.

## Purpose
- Bridges the web-context view model and the resolved `IWebContext` with the round-trip form used to carry context id/value between requests, and the TempData hand-off used for same-application navigation.

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

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| RenderWebContext(HtmlHelper, WebContextViewModel) | `public static void RenderWebContext(this HtmlHelper helper, WebContextViewModel model)` | Writes the `frmWebContext` form with hidden `WebContextId` and visible/hidden `WebContextValue` fields; see the "Render the web context control" operation. |
| SaveToTempData(IWebContext, TempDataDictionary) | `public static void SaveToTempData(this IWebContext context, TempDataDictionary tempData)` | Writes `TempData["WebContextId"]` so the next request's `Resolve web context` operation can pick it up; used by [OP-07](../../operations/op-07-navigate-between-applications-and-views.md) step 4. |

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