Skip to main content
Tab

SplitterPane.ContentUrl Property

Gets or sets the URL of a specific web page to be displayed within a pane.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v25.1.dll

NuGet Package: DevExpress.Web

Declaration

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

Property Value

Type Default Description
String String.Empty

A string value that specifies a page’s URL.

Remarks

Use the ContentUrl property to specify the URL of a web page which should be loaded into, and displayed within, the current pane. A relative or an absolute URL can be used.

The ASPxClientSplitterPane.SetContentUrl and ASPxClientSplitterPane.GetContentUrl methods can be used to specify and obtain the URL of a pane’s content web page on the client side.

Note

It’s necessary to set the ContentUrl property (for instance, to any dummy value such as “about:blank”) to enable use of the client ASPxClientSplitterPane.SetContentUrl method and the server SplitterPane.ContentUrlIFrameName property. Otherwise, if the ContentUrl property is not set, the corresponding IFRAME element is not rendered within a pane. In this case, calling the ASPxClientSplitterPane.SetContentUrl method and defining the SplitterPane.ContentUrlIFrameName have no effect.

A pane cannot obtain the content size if you specify the ContentUrl property. In this case, AutoHeight and AutoWidth properties may work incorrectly. The following example adjusts the pane height to the content size:

<dx:ASPxSplitter ID="ASPxSplitter1" runat="server" ClientInstanceName="splitter"
    Width="100%">
    <Panes>
        <dx:SplitterPane ContentUrl="ContentPage.aspx" Name="ContentUrlPane">
        </dx:SplitterPane>
        <dx:SplitterPane>
        </dx:SplitterPane>
    </Panes> 
    <ClientSideEvents PaneContentUrlLoaded="CalculateSize"/>          
</dx:ASPxSplitter>
function CalculateSize(s, e) {
    const iframeElement = s.GetPaneByName('ContentUrlPane').GetContentIFrame();
    const iframeDoc = iframeElement.contentDocument || iframeElement.contentWindow.document;
    const iFrameOffsetHeight = iframeDoc.documentElement.offsetHeight;
    s.SetHeight(iFrameOffsetHeight);
}

View Example: How to resize a pane according to the height of its content specified by the ContentUrl property

See Also