In this topic, you will learn how to add a C1NavigationList control to the content area of the C1ViewPort control. This topic assumes that you have created an AJAX-enabled ASP.NET project that contains a ScriptManager control (see Creating an AJAX-Enabled ASP.NET Project) and a C1ViewPort control.
In Design View
Complete the following steps:
1. Place your cursor in the content area of the C1ViewPort control.
2. In the Toolbox, double-click the C1NavigationList control.
The placeholder for a C1NavigationList appears in the content area of the C1ViewPort control.
In Source View
To add a C1NavigationList control to a C1ViewPort control's content area, place the following code between the <cc1:C1ViewPort> and </cc1:C1ViewPort> tags:
<Content>
<cc2:C1NavigationList ID="C1NavigationList1" runat="server">
</cc2:C1NavigationList>
</Content>
In Code
Complete the following steps:
1. Import the following namespace into your project:
Imports C1.Web.iPhone.C1ViewPort
Imports C1.Web.iPhone.C1NavigationList
•C#
using C1.Web.iPhone.C1ViewPort;
using C1.Web.iPhone.C1NavigationList;
2. Create the C1NavigationList object by placing the following code in the Page_Load event:
Dim newNavigationList As New C1NavigationList()
•C#
C1ViewPort1.Controls.Add(newNavigationList);
3. Add the C1NavigationList to the C1ViewPort control by placing the following code in the Page_Load event:
C1ViewPort1.Controls.Add(newNavigationList)
•C#
C1ViewPort1.Controls.Add(newNavigationList);
4. Save the project and open it in a Studio for iPhone-compatible browser to execute the program.