ASP.NET Pack Programmer's Guide
Slider

The Slider control represents a range slider, which can be used to specify a numeric value constrained between a minimum and maximum.

Server side

Getting and setting the control's value

Use the Slider.Value property to get or set the control's current value.

Customizing the control

Set the orientation of the control by setting the Orientation to either Horizontal or Vertical. To define range for the value use the Minimum and Maximum properties respectively. To customize the format DecimalDigits to set the precision of value. The step with which the control increments or decrements the value by sliding the thumb handle is defined by the Step property.

Events

The following events are exposed by the Slider class.

Event

Event arguments

Description

ValueChanged

ValueChangedEventArgs<Double>

Raised when the value of the control has changed.

Client side

Getting a reference to the control

You can access the control on the client side by its ClientID. 

JavaScript  Copy Code

var slider = $find("Slider1");
var slider = $find("<%= Slider1.ClientID %>");

Getting and setting the control's value

Use the get_value and set_value methods to get or set the control's value.

JavaScript  Copy Code

slider.set_value(42);
alert(slider.get_value());

Events

The following client-side event are exposed by the NumericUpDown class.

Event

Event arguments

Script property

Description

valueChanged

ValueChangedEventArgs

ValueChangedScript

Raised when a control value has changed.

controlLoaded

-

ControlLoadedScript

Raised just after the control has finished loading and is ready for interaction.