ComponentOne MultiPage for ASP.NET AJAX: MultiPage for ASP.NET AJAX Task-Based Help > Adding and Manipulating Page Content > Displaying External Content in a Page

Displaying External Content in a Page

The ContentUrl property can be used to display external content inside of the C1MultiPage control. You can either use it to display the content of a Web page that you have created or to exhibit a Web page outside of your domain. In this topic, you will set the ContentUrl property in Design view, in Source view, and in Code.

Setting the ContentUrl Property in Design View

Complete the following steps to set the ContentUrl property:

1.   Click C1MultiPage's smart tag to open the C1Multipage Tasks menu and then select MultiPage Designer.

      The C1MultiPage Designer Form opens.

2.   In the C1MultiPage Designer Form, click the Add Child Item  button  to add a new page to the control.

3.   In treeview, select the C1PageView1 and set the ContentUrl property in the Properties grid. You can set this to any URL; for this example, we're going to type in "http://www.componentone.com".

     

     

 

4.   Click OK to exit the C1MultiPage Designer Form.

5.   Run the project and note that the C1MultiPage now displays the ComponentOne Web site.

Setting the ContentUrl Property Demand in Source View

To set a C1MultiPage to load on demand in Source view , add ContentUrl="http://www.componentone.com" to the <cc1:C1PageView> tag.  Your HTML will resemble the following:

 

<cc1:C1PageView ID="C1PageView1" runat="server" ContentUrl="http://www.componentone.com">

 

Run the project and note that the C1MultiPage now displays the ComponentOne Web site.

Setting the ContentUrl Property in Code

To set the ContentUrl property, complete the following:

1.   Import the following namespace to your project:

      Visual Basic

Imports C1.Web.UI.Controls.C1MultiPage

      C#

using C1.Web.UI.Controls.C1MultiPage;

2.   Add the following code to the Page_Load event:

      Visual Basic

Me.C1PageView1.ContentUrl = http://www.componentone.com

      C#

this.C1PageView1.ContentUrl = "http://www.componentone.com";

3.   Run the project and note that the C1MultiPage now displays the ComponentOne Web site.

This Topic Illustrates the Following:

A C1MultiPage can be used to exhibit outside content. The graphic below features a C1MultiPage control displaying external content:

 


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