---
title: SAIFImageButton
summary: API reference for SAIFImageButton.
status: draft
owner: SAIF documentation team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2.Menu
reference_type: package
---

# SAIFImageButton

`SAIFImageButton` is a thin `System.Web.UI.WebControls.ImageButton` subclass that adds a "busy indicator" CSS class and a companion client-side script (`/Resources/Scripts/Controls/ImageButton.js`) capable of disabling other form controls while a postback triggered by the button is pending. It is the shared visual/behavioral building block instantiated by `SAIFMenuTop.BuildMenuIcons` for every icon in the top toolbar (with `SAIFMenuTop.getImageButton` later locating those already-built controls by ID via `FindControl`), and it is independently reusable in other markup.

## Purpose
- Provides a consistent "busy/processing" UX affordance for image-button postbacks across the menu controls, without each caller having to wire the CSS class and client script manually.
- Serves as the concrete control type instantiated by `SAIFMenuTop.BuildMenuIcons` for every `SAIFMenuTop` toolbar icon (Insert/Save/Delete/etc.), keeping that control's icon-building logic uniform; `SAIFMenuTop.getImageButton` subsequently retrieves the already-built instance by ID.

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2.Menu`
- Assembly/package: `SAIF.Presentation.Web.Controls.V2.Menu` (packaged within `SAIF.BOF.Presentation.Web.Infragistics103`)
- Implements `INamingContainer`.
- Decorated with `AspNetHostingPermissionAttribute` (`SecurityAction.Demand` and `SecurityAction.InheritanceDemand`, both `Level:=AspNetHostingPermissionLevel.Minimal`) — a legacy Code Access Security (CAS) declaration limiting the minimum trust level under which the control (and any inheriting class) may run in medium/partial-trust IIS hosting scenarios.

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `DisableFormControlsOnClick` | `Property DisableFormControlsOnClick As Boolean` | Controls whether the client script disables other form controls on the page while this button's postback is pending, preventing duplicate/conflicting user input during processing. |
| `EnableIndicator` | `Property EnableIndicator As Boolean` | Switches the button's `CssClass` to `"SAIFImageButtonIndicator"` and registers the companion client script (`ImageButton.js`) once per page, activating the busy-indicator behavior. |

## Behavioral notes
- On `PreRender`, sets `CssClass = "SAIFImageButton"`; when `EnableIndicator` is true, changes it to `"SAIFImageButtonIndicator"`, adds a `DisableFormControls` attribute reflecting `DisableFormControlsOnClick`, and registers the client script include once per page via `Page.ClientScript.RegisterClientScriptInclude`.
- Has no dependency on `SAIFMenu`/`SAIFMenuTop` beyond being constructed by `SAIFMenuTop.BuildMenuIcons` and looked up by `SAIFMenuTop.getImageButton(clsMenuButton)`; it can be used directly in other markup as a standalone control.

## Constraints and usage notes
- The `AspNetHostingPermission` CAS attribute limits this control (and any class inheriting it) to a minimum trust level of `Minimal`, relevant only in legacy medium/partial-trust IIS hosting configurations.
- Depends on the site-relative static resource `/Resources/Scripts/Controls/ImageButton.js` being deployed by the consuming web application*.

> **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`
