---
title: Render an image button
summary: Apply the shared SAIFImageButton CSS class and, when the activity indicator is enabled, wire up the client-side indicator/form-disable script.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2.Menu
reference_type: package
operation_id: OP-MENU-015
trigger: "`SAIFImageButton.PreRender`, during the ASP.NET render phase for any `SAIFImageButton` instance."
---

# Render an image button

Apply the shared SAIFImageButton CSS class and, when the activity indicator is enabled, wire up the client-side indicator/form-disable script. This operation is implemented by `SAIFImageButton.PreRender`.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-MENU-015 |
| **Trigger** | `SAIFImageButton.PreRender`, during the ASP.NET render phase for any `SAIFImageButton` instance. |
| **Inputs** | `EnableIndicator`. |
| **Outputs** | CSS class on the rendered `<img>`/`<input>`; registered `ImageButton.js` reference; `DisableFormControls` attribute. |
| **Primary components** | `SAIFImageButton.PreRender` |
| **Entry point** | `SAIF.Presentation.Web.Controls.V2.Menu/SAIFImageButton.vb` |

## Steps

1. Set the CSS class to `SAIFImageButton`. Enforces [BR-MENU-072](../business-rules.md#br-menu-072-every-image-button-carries-css-class-saifimagebutton).
2. When `EnableIndicator` is true, switch the class to `SAIFImageButtonIndicator`, publish the `DisableFormControls` attribute and register `/Resources/Scripts/Controls/ImageButton.js` once per page. Enforces [BR-MENU-073](../business-rules.md#br-menu-073-enabling-the-indicator-switches-the-css-class-and-publishes-disableformcontrols), [BR-MENU-074](../business-rules.md#br-menu-074-imagebuttonjs-is-registered-once-per-page-only-when-the-indicator-is-enabled).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["SAIFImageButton.PreRender"]) --> Css["Set CSS class to SAIFImageButton"]
	Css --> Indicator{EnableIndicator?}
	Indicator -->|Yes| SwitchClass["Switch class to SAIFImageButtonIndicator"]
	SwitchClass --> Publish["Publish DisableFormControls attribute"]
	Publish --> Register["Register ImageButton.js once per page"]
	Register --> End(["Rendered img/input with CSS class"])
	Indicator -->|No| End
```

## Failure and edge-case behavior

- No exceptional failure paths beyond those noted in the steps above.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Database tables](../database-tables.md)

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