---
title: SAIFMessage
summary: API reference for SAIFMessage.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2
reference_type: package
---

# SAIFMessage

Displays a one-row status/validation message with an icon automatically chosen from keywords in the message text, so callers don't need to pick an icon themselves [BR-V2-042](../../business-rules.md#br-v2-042-error-keyword-selects-the-error-icon).

## Purpose
- Selects the error icon when the text contains an error keyword, ahead of any other keyword match [BR-V2-042](../../business-rules.md#br-v2-042-error-keyword-selects-the-error-icon).
- Falls back to the warning icon for unmatched text so a message is never left iconless [BR-V2-043](../../business-rules.md#br-v2-043-warning-keyword-or-unmatched-text-selects-the-warning-icon).
- Ensures its client script is included only once per page even with multiple `SAIFMessage` instances [BR-V2-037](../../business-rules.md#br-v2-037-messagejs-included-once-per-page).

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2`
- Assembly/package: `SAIF.Presentation.Web.Controls.V2` (packaged in `SAIF.BOF.Presentation.Web.Infragistics111.nuspec`)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Text | `Public Property Text As String` | The message text; also used to auto-select the rendered icon by keyword. |
| DisplayImage | `Public Property DisplayImage As SAIFMessage.Images` | Overrides automatic icon selection with an explicit `Images` value. |
| RenderControl | `Public Overrides Sub RenderControl(writer As HtmlTextWriter)` | Renders the icon+label table; on failure, writes the exception message, source, and stack trace into the page instead of throwing. |

## Behavioral notes
- If rendering fails, the exception message, source, and stack trace are written directly into the rendered output rather than propagated*.

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `SAIF.Presentation.Web.Controls.V2/SAIFMessage.vb`
