ComponentOne Expander for ASP.NET AJAX: Expander for ASP.NET AJAX Task-Based Help > Displaying External Content

Displaying External Content

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. To set the ContentUrl property at run time see, Setting the ContentUrl Property and Header at Run Time. 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" HeaderSize="25px" Height="200px" Width="100px" 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 Misc 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:

      Visual Basic

Me.C1Expander1.ContentUrl = "http://www.google.com/"

      C#

this.C1Expander1.ContentUrl = "http://www.google.com/";


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.