---
title: Render busy-indicator image button
summary: Adds a busy-indicator CSS class and registers the companion client script for a SAIFImageButton instance during PreRender.
status: draft
owner: SAIF documentation team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2.Menu
reference_type: package
operation_id: OP-MENU-003
trigger: PreRender event of any SAIFImageButton instance (both standalone use and as used internally by SAIFMenuTop)
---

# Render busy-indicator image button

This operation applies the "busy indicator" CSS class and (when enabled) registers the companion client script for a `SAIFImageButton` instance, used both standalone and internally by every icon in `SAIFMenuTop`'s toolbar.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-MENU-003 |
| **Trigger** | `PreRender` event of any `SAIFImageButton` instance |
| **Inputs** | `EnableIndicator`, `DisableFormControlsOnClick` property values |
| **Outputs** | Updated `CssClass`; registered client script include `/Resources/Scripts/Controls/ImageButton.js` (once per page) |
| **Primary components** | `SAIFImageButton` (`PreRender` override) |
| **Entry point** | `SAIF.Presentation.Web.Controls.V2.Menu\SAIFImageButton.vb` |

## Steps

1. On `PreRender`, sets `CssClass = "SAIFImageButton"`.
2. If `EnableIndicator` is true:
   - Changes `CssClass` to `"SAIFImageButtonIndicator"`.
   - Adds a `DisableFormControls` attribute reflecting `DisableFormControlsOnClick`.
   - Registers (once per page) the client script include `/Resources/Scripts/Controls/ImageButton.js` via `Page.ClientScript.RegisterClientScriptInclude`.
3. No rule/SQL/table interaction occurs in this operation.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([PreRender fires]) --> SetCss[Set CssClass to SAIFImageButton]
	SetCss --> D{EnableIndicator true?}
	D -->|Yes| Indicator[Set CssClass to SAIFImageButtonIndicator; set DisableFormControls attribute]
	Indicator --> Register[Register ImageButton.js client script include once per page]
	D -->|No| EndOk([Render complete])
	Register --> EndOk
```

## Failure and edge-case behavior
- The client script include is registered only once per page regardless of how many `SAIFImageButton` instances request it (standard `RegisterClientScriptInclude` per-key dedupe behavior)*.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [API reference](../api/index.md)

> **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
- `SAIF.Presentation.Web.Controls.V2.Menu\SAIFImageButton.vb`
