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

ASPxPopupControlBase.ContentUrl Property

Specifies whether to display a web page’s navigation location in the control’s window.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("")]
public string ContentUrl { get; set; }

Property Value

Type Default Description
String String.Empty

The page’s navigation location.

Remarks

Use the ContentUrl property to specify the URL (relative or absolute) of a web page that should be loaded and displayed in the control’s window.

Note

  • The ASPxPopupControl uses the IFrame tag to show its content. When the ContentUrl property is used, the page within this IFrame doesn’t have dimensions (e.g., the browser window can be resized to all sizes, and you can’t determine the “original” page size). So, use the ASPxWebControl.Height property or the client side ASPxClientPopupControl.SetSize method to specify the popup control’s height.
  • The dock panel loads its content page in an iframe element if you use the ContentUrl property. The dock panel’s iframe is removed from the DOM tree and reloaded when you dock/float the ASPxDockPanel from the ASPxDockZone. As a result, the script is not executed inside the iframe and you cannot use the DOM API of the iframe window. This behavior is a known issue of the IE 9 browser described in the APIs Are Not Available if iFrame Is Removed from DOM Tree article.
  • The server generates the popup window’s content when you use the PerformCallback method to send a callback to the server.

Example

The example illustrates how to return values from the ASPxPopupControl’s ASPxPopupControlBase.ContentUrl page. The ContentUrl page calls the “HidePopupAndShowInfo” function, which is defined on the parent page. The function is called on the client and server sides.

See Also

View Example

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <script type="text/javascript">
        function OnBtnShowPopupClick() {
            popup.Show();
        }
        function HidePopupAndShowInfo(closedBy, returnValue) {
            popup.Hide();
            alert('Closed By: ' + closedBy + '\nReturn Value: ' + returnValue);
        }
    </script>

    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <input id="btnShowPopup" type="button" onclick="OnBtnShowPopupClick();" value="Show Popup" />
            <dx:ASPxPopupControl ID="popup" runat="server" ClientInstanceName="popup" ContentUrl="~/PopupContent.aspx"
                Width="300px" Height="200px">
            </dx:ASPxPopupControl>

        </div>
    </form>
</body>
</html>
See Also