---
title: Constants
summary: API reference for Constants.
status: draft
owner: SAIF IT Core Services
last_reviewed: 2026-10-12
library: BolMiddleware
reference_type: package
---

# Constants

Holder of the fixed names the library uses for session keys, form fields, and query parameters, so the page models, services, and views agree on them.

## Purpose
- Centralize the storage and parameter names used to pass context between requests ([BR-BOLMIDDLEWARE-001](../../business-rules.md#br-bolmiddleware-001-web-context-resolution-precedence)).

## Context
- Namespace: `BolMiddleware.Contracts`
- Assembly/package: `BolMiddleware`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `WebContextSaveKey` | `const string WebContextSaveKey` | Defined but not referenced anywhere in the library. |
| `WebContextKey` | `const string WebContextKey` | Session key for the serialized web context. |
| `BolMenuKey` | `const string BolMenuKey = "BolMenu"` | Session key for the cached menu. |
| `BolPolicyHeaderKey` | `const string BolPolicyHeaderKey = "BolPolicyHeader"` | Session key for the cached policy header. |
| `WebContextIdKey` | `const string WebContextIdKey = "WebContextId"` | Form and session name for the context id. |
| `CidKey` | `const string CidKey = "cid"` | Query string name carrying the context id during navigation. |

## Behavioral notes
- The class is public and not static, so it can be instantiated although it holds only constants.

## Constraints and usage notes
- Changing a value breaks compatibility with other BOL applications that exchange context ids.

## Sources
- src/BolMiddleware/Contracts/Constants.cs
