Click here to Skip to main content
Click here to Skip to main content
Go to top

ASPSlider: A slider control for ASP.NET

, 22 Sep 2005
Rate this:
Please Sign up or sign in to vote.
ASPSlider is a slider control implemented in ASP.NET. ASPSlider is a highly customizable and easy to use slider control.

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 IE 6.

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 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)
{ //…..code goes here }
</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 at ashish_@rediffmail.com.

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

Share

About the Author

ashish_patil++
Web Developer
India India
Ashish is an Electronics Engineer. He loves computers and programming, and always tries to do something different. Ashish started his programming career with FoxPro 2.5 (6 years ago) .Ashish has programmed in number of languages including C\C++ , Tcl\Tk , Assembly Language , JavaScript. Currently he works with ASP.NET, C# and VB.NET. He is currently working in multinational consulting company in India.
 
He devotes much of his free time to his website: http://ashishware.com , which contains lot of cool stuff on webdevelopment and programing in general.

Comments and Discussions

 
QuestionI can't add ASPSlider.dll. VS2010 says that ASPSlider.dll doesn't contain any components to install. Pinmembervlad27528-Mar-12 21:41 
GeneralVisual Studio Folders PinmemberCWetnose14-Apr-11 6:15 
GeneralDynamically Added in ASP.NET Form Pinmemberjosuealepan19-Oct-10 7:51 
Generali need to create multiple sliders based on a return from sp PinmemberimatureStudent8-Mar-10 6:51 
Questionhow to Assing a current value using javascript PinmemberMember 36772362-Jul-08 0:23 
GeneralNot Working FireFox PinmemberAvaniFaldu25-Mar-08 3:12 
GeneralNo DRAG and DROP behavior PinmemberMichael Freidgeim28-Nov-07 16:17 
QuestionSecond Handle? PinmemberSameers (theAngrycodeR )22-Jul-07 1:40 
GeneralSounds Good PinmemberSameers (theAngrycodeR )24-Mar-06 3:44 
GeneralGood but Pinmemberjumacabo30-May-05 23:24 
GeneralRe: Good but Pinmemberashish_patil++31-May-05 0:42 
GeneralRe: Good but PinmemberRoger J31-May-05 1:46 
GeneralRe: Good but Pinmemberashish_patil++31-May-05 2:37 
GeneralRe: Good but PinmemberRoger J31-May-05 2:42 
GeneralRe: Good but PinsussAnonymous31-May-05 6:37 
GeneralRe: Good but PinsussAnonymous31-May-05 6:48 
GeneralRe: Good but Pinmembercomeltan27-Sep-05 16:28 
GeneralRe: Good but Pinmemberjingking29-Jul-06 4:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 22 Sep 2005
Article Copyright 2005 by ashish_patil++
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid