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

# WebContextViewModel

View-model shape for the round-trip web-context form rendered by `WebContextExtensions.RenderWebContext`, carrying the context id/value and whether the context box should be visibly shown.

## Purpose
- View-model shape for the round-trip web-context form rendered by `WebContextExtensions.RenderWebContext`, carrying the context id/value and whether the context box should be visibly shown.

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

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| ContextId | `public string ContextId { get; set; }` | The resolved web-context id, round-tripped through the hidden `WebContextId` form field. |
| ContextValue | `public string ContextValue { get; set; }` | The resolved web-context value, round-tripped through the `WebContextValue` form field. |
| ShowContextBox | `public bool ShowContextBox { get; set; } = true` | Whether the context form is visibly rendered; defaults to `true` (see [BR-46](../../business-rules.md#br-46-web-context-control-hidden-unless-explicitly-enabled)). |

## Sources
- `src/Web.Mvc/ViewModels/WebContextViewModel.cs`
