You can use the C1Button control to navigate to internal or external pages by setting the NavigateUrl property. This topic illustrates how to set the NavigateUrl property in Design view, in Source view, and in code. 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 C1Button control.Note: In order for the C1Button control to appear, you must set the Text property.
In Design View
Complete the following steps:
1. Right-click the C1Button control to open its context menu and then select Properties from the list.
The Properties window opens with C1Button's properties in focus.
2. Locate the NavigateUrl property and enter the path to a Web page in its text box. For this example, enter "http://www.componentone.com".
3. Save the project and open it in a Studio for iPhone-compatible browser. Click the button and observe that it directs you to the ComponentOne Web site.
In Source View
To set the NavigateUrl property, add NavigateUrl="http://www.componentone.com" to the <cc1:C1Button> tag so that the XHTML markup resembles the following:
<cc1:C1Button ID="C1Button1" runat="server" Text="Link" ButtonType="Standard" NavigateUrl="http://www.componentone.com" />
Save the project and open it in a Studio for iPhone-compatible browser. Click the button and observe that it directs you to the ComponentOne Web site.
In Code
Complete the following steps:
1. Import the following namespace into your project:
Imports C1.Web.iPhone.C1Button
•C#
using C1.Web.iPhone.C1Button;
2. Set the NavigateUrl property by adding the following code to the Page_Load event:
•C#
C1Button1.NavigateUrl = http://www.componentone.com;
3. Save the project and open it in a Studio for iPhone-compatible browser to execute the program. Click the button and observe that it directs you to the ComponentOne Web site.