In this section, you will learn how to set the maximum, minimum, and current values of the C1Slider control 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).
Note: You can also set the C1Slider control's MaximumValue, MinimumValue, and Value properties on the client side. To learn how to set the Value property on the client side, see Setting the C1Slider Control's Value on the Client Side.
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 Value property to "250".
• Set the MinimumValue property to "50".
• Set the MaximumValue property to "500".
In Source View
To set the values of a C1Slider control, add Value="50", MinimumValue="250", and MaximumValue="500" to the <cc1:C1Slider> tags so that the markup resembles the following:
<cc1:C1Slider ID="C1Slider1" runat="server" Value="250" MinimumValue="50" MaximumValue="500">
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 Value, MinimumValue, and MaximumValue properties of the C1Slider control by adding the following code to the Page_Load event.
C1Slider1.Value = 250
C1Slider1.MinimumValue = 50
C1Slider1.MaximumValue = 500
•C#
C1Slider1.Value = 250;
C1Slider1.MinimumValue = 50;
C1Slider1.MaximumValue = 500;
3. Save the project and open it in a Studio for iPhone-compatible browser to execute the program.