ComponentOne Window for ASP.NET AJAX: Window for ASP.NET AJAX Task-Based Help > Customizing the Content Area > Showing External Content in the Content Area

Showing External Content in the Content Area

In Window for ASP.NET AJAX you can show external content in a dialog window. 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 dialog window. Pointing to external content is simple using the ContentUrl property. In this topic you'll set the ContentUrl property at design time. To change the ContentUrl property at run time instead, see the Setting the ContentURL Property at Run Time topic.

To show external content in the dialog window, complete the following steps:

1.   Navigate to the Visual Studio Toolbox, and double-click the C1Window icon to add the C1Window control to your page.

2.   Click the control's smart tag () to open the C1Window Tasks menu and select the ShowOnLoad checkbox to set the ShowOnLoad property to True:

 

 

For more information on accessing the smart tag, see C1Window Smart Tag.

3.   In the C1Window Tasks menu click on the VisualStyle drop-down arrow and select Office2007Blue.

4.   Navigate to the Properties window and set the following properties for C1Window1:

      Set the StatusVisible property to False.

      Set the Height property to 225px.

      Set the Width property to 300px.

5.   Set the ContentURL property to the location of the content that you want to appear in the content area of the dialog window:

 

In the Designer

To show external content in the content area using the designer, navigate to the Properties window and set the following property:

      Set the ContentURL property to "http://www.google.com".

 

In Code

To show external content in the content area in code, switch to the Code view and add the following code to the Page_Load event:

      Visual Basic

C1Window1.ContentUrl = "http://www.google.com"

      C#

C1Window1.ContentUrl = "http://www.google.com";

 

In Source view

To show external content in the content area from the Source view, switch to the Source view and complete the following:

1.   Locate the <cc1:C1Window></cc1:C1Window> tags.

2.   Add the text ContentUrl="http://www.google.com" within the <cc1:C1Window> tag. The tag will appear similar to the following:

<cc1:C1Window ID="C1Window1" runat="server" AllowResize="True" Height="225px" ShowOnLoad="True" VisualStyle="Office2007Blue" VisualStylePath="~/C1WebControls/VisualStyles" Width="300px" StatusVisible="False" X="0" Y="0" ContentUrl="http://www.google.com">

Run the program and observe:

The Web site indicated by the ContentURL property appears in the content area of the dialog window:

 


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