ComponentOne Expander for ASP.NET Web Forms
Task-Based Help / Displaying External Content
In This Topic
    Displaying External Content
    In This Topic

    You can use the ContentUrl property to display external content in the C1Expander control. This means that you can have the content of another Web page in your project or even the content of a Web site outside of your project appear in a C1Expander. You can easily set the ContentUrl property in Source view, from the Properties window, or in code.

    In Source View

    In Source view change add ContentUrl in the <cc1:C1Expander> tag to set the external URL to display in the C1Expander control, for example:

    <cc1:C1Expander ID="C1Expander1" runat="server" ContentUrl="http://www.google.com/">
    

    The above will set the Google Web site to appear in the C1Expander control.

    From Design View

    You can change the ContentUrl property to the URL to be displayed in the C1Expander via the Properties window:

    1. Click on the C1Expander to select it.
    2. Navigate to the Properties window and if needed expand the Options node to locate the ContentUrl property.
    3. Next to ContentUrl, type the URL for the page you wish to appear in the control, for example "http://www.google.com/".
    4. Press the ENTER key or click outside of the Properties window for ContentUrl you set to be applied to the C1Expander control.

    In Code

    Add the following code to the Page_Load event to set the ContentUrl property to display external content in the C1Expander control:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1Expander1.ContentUrl = "http://www.google.com/"
    

    To write code in C#

    C#
    Copy Code
    this.C1Expander1.ContentUrl = "http://www.google.com/";