Adding C1SwitchButton to the Toolbar of a C1ViewPort

In this topic, you will add a C1SwitchButton to the toolbar 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).

Complete the following steps:

1.   In the Toolbox, double-click C1ViewPort to add a C1ViewPort control to your project. 

2.   Click the Source button to enter Source view. 

3.   Register the C1SwitchButton assembly by entering the following code to the Source page. Place this code beneath the registry for the C1ViewPort assembly. 

 

<%@ Register Assembly="C1.Web.iPhone.3" Namespace="C1.Web.iPhone.C1SwitchButton" TagPrefix="cc2" %>

 

4.   Enter the following markup between the <cc1:C1ViewPort> and </cc1:C1ViewPort> tags:

<ToolBar>

<cc2:C1SwitchButton On="True" runat="server"/>

</ToolBar>

5.   Return to Design view and observe that the C1SwitchButton control appears in the toolbar area of the C1ViewPort control. 

 This Topic Illustrates the Following:

The following image shows a C1SwitchButton control in the content area of the C1ViewPort control:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.