ASPSlider is a highly customizable and easy to use slider control which is free (for noncommercial use). ASPSlider uses DHTML extensively to achieve its functionality.
Introduction
ASPSlider
is a slider control implemented in ASP.NET. Simply click anywhere on the slider, move your mouse to the desired position, and click again. ASPSlider
is a highly customizable and easy to use slider control. It is free (for noncommercial use). ASPSlider
uses DHTML extensively to achieve its functionality. Till now, it has only been tested with IE6.
Screenshots

| <ASPSlider id="ASPSlider1"
runat="server"
SliderImageURL="images/arr7.gif"
SliderTextColor="Orange"
ScaleBgImageURL="images/backr.gif"
CurrentValue="0"
MaxValue="100" MinValue="0"
SliderHeight="2px"
SliderWidth="270px>
</uc1:ASPSlider>
|

| <uc1:ASPSlider id="ASPSlider2"
runat="server"
SliderImageURL="images/dot.gif"
ScaleBgImageURL="images/backs.gif"
CurrentValue="250" SliderHeight="22px"
MiddleTextClass="orangetext"
ValueLabelClass="myclass"
SliderWidth="270px"
MaxValue="300" MinValue="100"
SliderBorderSize="0"
SliderBorderColor="Red">
</uc1:ASPSlider>
|

| <uc1:ASPSlider id="ASPSlider3"
runat="server"
SliderImageURL="images/arr5.gif"
ScaleBgImageURL="images/back3.jpg"
CurrentValue="25" SliderHeight="20px"
SliderWidth="270px" MinValue="0"
MaxValue="50"></uc1:ASPSlider>
|

| <uc1:ASPSlider id="ASPSlider4"
runat="server"
SliderImageURL="images/arr8.gif"
ScaleBgImageURL="images/back9.gif"
CurrentValue="250"
SliderHeight="22px"
ValueLabelClass="redclass"
MiddleTextClass="redclass"
SliderWidth="270px"
MaxValue="400" MinValue="250"
SliderBorderSize="0"
SliderBorderColor="Red"></uc1:ASPSlider>
|

Client slide event example. When any of the slider's values is changed, the round figure changes its position on screen.
Refer to file ClientScript.aspx.

Color selector implemented using client side events of ASPSlider. When user clicks 'Apply' the text color of center label changes. This is done at server side.
Refer to file ColorSelector.aspx.
I made ASPSlider
in my free time. With the rise in popularity of ASP.NET and WebForms, the demand for more ‘Windows’ like controls for web applications has risen. ASPSlider
tries to mimic the behavior of Windows Slider
control as far as possible. It allows the user to select a value in a given range. To select or change the value, first you have to click on the slider, then move your mouse to the desired position and click again. ASPSlider
mainly relies on a complex combination of JavaScript and DHTML to achieve its functionality.
The major challenge in implementing the control was to remember the current value and position across postbacks. Lots of features are still to be added to the control. Also the control needs a lot of testing. I hope people downloading this control will use it and mail me their feedback, suggestions and bugs.
ASPSlider
also allows client-side scripting. Just set the OnChangeClientCallBack
property to the name of the client side JavaScript that will be called whenever the value of the slider changes. The JavaScript function should accept one parameter, which is used to supply the current value. Example:
<script>
function move(x)
{
</script>
A Word about using ASPSlider
This control is an open source software. You can use if for free only for non-commercial purposes. If you need to use it commercially or want me to make any custom enhancements, please contact me by leaving a comment below.
History
- 31st May, 2005: Initial post
License
This article has no explicit license attached to it, but may contain usage terms in the article text or the download files themselves. If in doubt, please contact the author via the discussion board below. A list of licenses authors might use can be found here.