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.BuildMenuIconsfor everySAIFMenuToptoolbar icon (Insert/Save/Delete/etc.), keeping that control's icon-building logic uniform;SAIFMenuTop.getImageButtonsubsequently retrieves the already-built instance by ID.
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2.Menu - Assembly/package:
SAIF.Presentation.Web.Controls.V2.Menu(packaged withinSAIF.BOF.Presentation.Web.Infragistics103) - Implements
INamingContainer. - Decorated with
AspNetHostingPermissionAttribute(SecurityAction.DemandandSecurityAction.InheritanceDemand, bothLevel:=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, setsCssClass = "SAIFImageButton"; whenEnableIndicatoris true, changes it to"SAIFImageButtonIndicator", adds aDisableFormControlsattribute reflectingDisableFormControlsOnClick, and registers the client script include once per page viaPage.ClientScript.RegisterClientScriptInclude. - Has no dependency on
SAIFMenu/SAIFMenuTopbeyond being constructed bySAIFMenuTop.BuildMenuIconsand looked up bySAIFMenuTop.getImageButton(clsMenuButton); it can be used directly in other markup as a standalone control.
Constraints and usage notes¶
- The
AspNetHostingPermissionCAS attribute limits this control (and any class inheriting it) to a minimum trust level ofMinimal, relevant only in legacy medium/partial-trust IIS hosting configurations. - Depends on the site-relative static resource
/Resources/Scripts/Controls/ImageButton.jsbeing 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