PopUpButton¶
PopUpButton is a System.Web.UI.WebControls.Button subclass that wraps its own click in a client-side confirm() or alert() dialog before the postback proceeds, giving hosting pages a one-line way to add a "are you sure?" or informational dialog to any button without writing custom JavaScript (OP-7).
Purpose¶
- Add a client-side confirmation or notification dialog directly to a standard ASP.NET
Buttonvia markup properties, instead of requiring the hosting page to register its own script. - Optionally block the postback entirely when the user cancels a
Confirm-type dialog.
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.PopUps - Assembly/package:
SAIF.Presentation.Web.Controls.PopUps.Infragistics111(package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
Message |
Public Property Message() As String |
The text displayed in the client-side confirm()/alert() dialog |
PopupType |
Public Property PopupType() As PopupTypes |
Selects whether the click wraps a blocking confirm() (Confirm) or a non-blocking alert() (Notify) |
PopupTypes (nested enum) |
Public Enum PopupTypes — members Notify, Confirm |
Determines which client-side dialog behavior Render() emits |
Inherited public members¶
Members in this section are inherited from System.Web.UI.WebControls.Button (a .NET Framework base class, not a documented SAIF library dependency). Standard Button members (Text, Click, CommandName, CommandArgument, CausesValidation, etc.) are available on this type through inheritance and are not re-documented here since their base is a BCL type outside this documentation set's scope.
Behavioral notes¶
Render()injects anonclickattribute —return(confirm(Message))forPopupType = Confirm(blocks postback on Cancel) oralert(Message)forPopupType = Notify(does not block postback) — before calling the baseButton.Render().
Constraints and usage notes¶
- Because the dialog attribute is added directly to the rendered
<input type=submit>element, any additionalonclickhandler set elsewhere on the page for the same button could conflict with the injected script*.
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.PopUps.Infragistics111\PopUpButton.vb