Skip to main content
A newer version of this page is available. .
Tab

ASPxPopupControl Class

A web control that enables you to add the popup window functionality to your web application.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public class ASPxPopupControl :
    ASPxPopupControlBase,
    IControlDesigner

The following members return ASPxPopupControl objects:

Library Related API Members
eXpressApp Framework CustomizePopupControlEventArgs.PopupControl
ASP.NET Web Forms Controls ASPxSchedulerPrepareFormPopupContainerEventArgs.Popup

Remarks

The ASPxPopupControl provides the ability to create and use a number of popup windows in your web application. Popup windows are a special type of overlapped temporary window that appear separately from an application’s main window, and are typically used to display quick reference information.

The ASPxPopupControl stores its popup windows in a specific ASPxPopupControl.Windows collection. If this collection is empty, the ASPxPopupControl represents a single default popup window. In this case, the default window’s appearance and behavior are defined by settings declared at the popup control level. If the ASPxPopupControl.Windows collection is not empty, the popup windows contained in the collection can be customized individually via settings available at the window level.

A popup window is typically used to display information about a specific web control or HTML element (or several controls/elements), which can be defined by the ASPxPopupControl.PopupElementID/PopupWindow.PopupElementID properties, in response to a specific client action (set via the ASPxPopupControl.PopupAction property). A window can appear using a predefined popup animation effect if the ASPxPopupControlBase.EnableAnimation property is set to true. The type of animation is specified via the ASPxPopupControlBase.PopupAnimationType property. The ASPxPopupControl.CloseAction property specifies the client action that closes a popup window.

A popup window’s display position can relate to the corresponding element and can be defined by the ASPxPopupControl.PopupHorizontalAlign, ASPxPopupControl.PopupHorizontalOffset, ASPxPopupControl.PopupVerticalAlign and ASPxPopupControl.PopupVerticalOffset properties. If no associated element is specified for a popup window, it can be displayed on the page load (by using the ASPxPopupControlBase.ShowOnPageLoad property) at a position specified by the ASPxPopupControlBase.Left and ASPxPopupControlBase.Top properties.

A popup window can be invoked and closed after a specific time interval defined by the ASPxPopupControl.AppearAfter and ASPxPopupControl.DisappearAfter properties. If the ASPxPopupControlBase.AllowDragging property is set to true, a displayed popup window can be dragged by its header or the entire window (based on the ASPxPopupControlBase.DragElement property value) within the page’s region. To allow users to resize windows, set the ASPxPopupControlBase.AllowResize property to true.

The ASPxPopupControl has the capability to load the content of popup windows on demand, e.g., when a popup window is invoked for the first time. The load mode is controlled by the ASPxPopupControl.LoadContentViaCallback property.

The state and position of the popup control’s windows can be preserved by using the ASPxPopupControlBase.SaveStateToCookies and ASPxPopupControlBase.SaveStateToCookiesID properties.

The ASPxPopupControl can be bound to any hierarchical data source by using its ASPxHierarchicalDataWebControl.DataSourceID or ASPxDataWebControlBase.DataSource property. The specific ASPxPopupControl.WindowDataBound event is generated during data binding, allowing you to dynamically map properties of a popup window to the required data fields from the bound data source.

A popup window consists of three main elements: header, content region, and footer. The elements major settings can be specified at both levels: for a default popup window at the level of a popup control, and for a popup window from the Windows collection at the window level.

A popup window content can be specified using one of the following properties:

Note

A popup element (i.e., ASPxDockPanel or ASPxPopupControl) cannot contain another popup element inside.

Note

The ASPxPopupControl height and width (accessible by the ASPxWebControl.Height and ASPxWebControl.Width properties) cannot be set as a percentage. Set the dimensions in pixels to correctly display the control in all browsers.

Note

The ASPxPopupControl control provides you with comprehensive client-side functionality implemented using JavaScript code :

The control’s client-side API is enabled if the ASPxPopupControlBase.EnableClientSideAPI property is set to true, or the ASPxPopupControlBase.ClientInstanceName property is defined, or any client event is handled.

See Also