You can remove the C1Slider control's increment and decrement buttons so that the value of the control can only be changed using the thumb button. In this topic, you'll explore how to remove the decrement and increment buttons in Design view, 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 C1Slider control.
In Design View
Complete the following steps:
1. Right-click the C1Slider control to open its context menu and then select Properties from the list.
The Properties window opens with C1Slider's properties in focus.
2. Set the following properties:
• Set the ShowDecrementButton property to False.
• Set the ShowIncrementButton property to False.
In Source View
To remove the decrement and increment buttons, add ShowDecrementButton=False and ShowIncrementButton=False to the <cc1:C1Slider> tags so that the markup resembles the following:
<cc1:C1Slider ID="C1Slider1" runat="server" ShowDecrementButton="False" ShowIncrementButton="False">
In Code
Complete the following steps:
1. Import the following namespace into your project:
Imports C1.Web.iPhone.C1Slider
•C#
using C1.Web.iPhone.C1Slider;
2. Set the ShowDecrementButton and ShowIncrementButton properties to False by adding the following code to the Page_Load event:
C1Slider1.ShowDecrementButton = False
C1Slider1.ShowIncrementButton = False
•C#
C1Slider1.ShowDecrementButton = false;
C1Slider1.ShowIncrementButton = false;
3. Save the project and open it in a Studio for iPhone-compatible browser to execute the program.
This Topic
Illustrates the Following:
In this topic, you removed the decrement and increment buttons from the C1Slider control. The image below depicts a C1Slider control with its decrement and increment buttons removed: