Tab
A newer version of this page is available. Switch to the current version.

ASPxPopupControl Class

A popup control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

public class ASPxPopupControl :
    ASPxPopupControlBase,
    IControlDesigner
Public Class ASPxPopupControl
    Inherits ASPxPopupControlBase
    Implements IControlDesigner

Remarks

The ASPxPopupControl allows you to create popup windows in your web application. Popup windows appear separately from an application's main window and disappear after the specified user action.

Create a Popup Control

Design Time

The ASPxPopupControl control is available on the DX.19.2: Navigation & Layout toolbox tab in the Microsoft Visual Studio IDE.

Drag the control onto a form and customize control settings, or paste the control markup in the page's source code.

<dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" HeaderText="Header" PopupElementID="ASPxButton1">
    <ContentCollection>
        <dx:PopupControlContentControl runat="server">
            <dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Text="Text box" Width="170px">
            </dx:ASPxTextBox>
        </dx:PopupControlContentControl>
    </ContentCollection>
</dx:ASPxPopupControl> 

<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Show Popup"></dx:ASPxButton>

Run Time

using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)
{
    Button btn = new Button();
    btn.ID = "ASPxButton1";
    btn.Text = "Show Popup";
    Page.Form.Controls.Add(btn);

    ASPxPopupControl pc = new ASPxPopupControl();
    pc.ID = "ASPxPopupControl1";
    Page.Form.Controls.Add(pc);
    pc.PopupElementID = "btn1";
    pc.HeaderText = "Header";
    pc.Controls.Add(CreateControl());
}
Control CreateControl()
{
    TextBox txt = new TextBox();
    txt.ID = "ASPxTextBox1";
    txt.Width = 200;
    txt.Text = "Text box";
    return txt;
}

Client-Side API

The ASPxPopupControl's client-side API is implemented with JavaScript language and exposed by the ASPxClientPopupControl object.

Availability

Available by default.

Class name

ASPxClientPopupControl

Access name

ClientInstanceName

Events