Skip to main content
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.v23.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 server generates the popup window’s content when you use the PerformCallback method to send a callback to the server.

Example

The following example demonstrates how to add an editor to the popup control’s ContentUrl page, get the editor’s value, and close a pop-up window on the client or server:

View Example: How to return values from the content page and close the pop-up window on the client or server

On the parent page, create a popup control and specify its ContentUrl property. Add an input element to the page and handle its Click event to invoke a pop-up window:

<input id="btnShowPopup" type="button" onclick="OnBtnShowPopupClick();" value="Show Popup" />
<dx:ASPxPopupControl ID="popup" runat="server" ClientInstanceName="popup"
    ContentUrl="~/PopupContent.aspx" .../>

On the ContentUrlPage, create a text box editor and two buttons. Create the HidePopupAndShowInfo function that hides the pop-up window and displays the editor’s value in an alert message. You can call that function on the client and server:

function HidePopupAndShowInfo(closedBy, returnValue) {
    popup.Hide();
    alert('Closed By: ' + closedBy + '\nReturn Value: ' + returnValue);
}

Online Example

View Example: How to pass a parameter from the content to parent page

See Also