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

# Constants

Centralizes the request-key literals and error-redirect URL that web-context resolution and exception handling depend on, so every consumer of this library uses the same key names and error page.

## Purpose
- Centralizes the request-key literals and error-redirect URL that web-context resolution and exception handling depend on, so every consumer of this library uses the same key names and error page.
- Backs [BR-01](../../business-rules.md#br-01-guarded-arguments-reject-null-or-empty-input)-adjacent request parsing in `HttpContextExtensions.GetWebContextId` and the redirect target used by [`HandleExceptionAttribute`](../SAIF.Web.Mvc/HandleExceptionAttribute.md).

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

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Cid | `public const string Cid = "cid"` | Query-string key used to carry a web-context id across an application boundary. |
| WebContextId | `public const string WebContextId = "WebContextId"` | Form field and TempData key that carries the resolved web-context id. |
| ErrorUrl | `public const string ErrorUrl = "//saifonline/weberror/processerror.aspx"` | Fixed error-page URL that `HandleExceptionAttribute` redirects non-AJAX requests to on an unhandled exception. |

## Behavioral notes
- All three values are compile-time constants; changing the error page or key names requires recompiling and repackaging this source-shipping library rather than a configuration change.*

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `src/Web/Constants.cs`
