This control allows creating client side pop up window that blocks out the background and brings a dialog to the foreground. This control can be used to replace ugly alert or prompt boxes to pop up rich dialogs that must be edited modally. Any dialog can be popped up like
The background can be just an opaque color with a transparency value - the default is black at 70% for example which gives a grey looking overlay - or can be a custom Html element that is expanded and then made transparent as in the following figure.
<>
The control is based on DragPanel so the dialogs can be draggable and closable. Events are available to fire when a button or the close button is clicked with event firing either on the client or server.
The client side counter part class can be used without this server side control and allows a few extra features, such as a mechanism to display a dialog without controls on the page to map to.
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.Panel
Westwind.Web.Controls.DragPanel
Westwind.Web.Controls.ModalDialog
public class ModalDialog : DragPanel
Class Members
Member | Description | |
---|---|---|
Constructor |
||
Show |
Shows the dialog as designed without any customizations public void Show() public void Show(string message, string title, bool asHtml) |
|
BackgroundOpacity |
The opacity of of the overlay background in a decimal percentage. Default to .85 | |
ClientDialogHandler |
Client side event handler that is fired when anything is clicked inside of the dialog. This can be a button, a hyperlink or any element. | |
ClientID |
Override to force simple IDs all around | |
ContentId |
The client ID of the element that receives the content message. If not specified the message is written to the body of the control. | |
FadeinBackground |
When true fades in the background by slowly increasing opacity of the background | |
HeaderId |
ID of a header element that receives the Title when calling showDialog() on the client. Optional - if not specified the header is not set which means the dialog displays as designed. | |
OverlayId |
Optional Id that is to be used for the shaded Overlay. This allows you to create a colored or otherwise designed background that pops over the existing content. | |
UniqueID |
Override to force simple IDs all around | |
zIndex |
The zIndex value for the overlay and dialog. This value must be higher than any other control on the page in order for the dialog to pop up on top. |
Requirements
Namespace: Westwind.Web.ControlsAssembly: westwind.web.webforms.dll
© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic