Click here to Skip to main content
12,628,454 members (33,970 online)
Click here to Skip to main content
Add your own
alternative version

Stats

262.2K views
8.1K downloads
51 bookmarked
Posted

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.

You may also be interested in...

Pro
Pro

Comments and Discussions

 
QuestionI can't add ASPSlider.dll. VS2010 says that ASPSlider.dll doesn't contain any components to install. Pin
vlad27528-Mar-12 22:41
membervlad27528-Mar-12 22:41 
GeneralVisual Studio Folders Pin
CWetnose14-Apr-11 7:15
memberCWetnose14-Apr-11 7:15 
GeneralDynamically Added in ASP.NET Form Pin
josuealepan19-Oct-10 8:51
memberjosuealepan19-Oct-10 8:51 
Generali need to create multiple sliders based on a return from sp Pin
imatureStudent8-Mar-10 7:51
memberimatureStudent8-Mar-10 7:51 
Questionhow to Assing a current value using javascript Pin
Member 36772362-Jul-08 1:23
memberMember 36772362-Jul-08 1:23 
GeneralNot Working FireFox Pin
AvaniFaldu25-Mar-08 4:12
memberAvaniFaldu25-Mar-08 4:12 
GeneralNo DRAG and DROP behavior Pin
Michael Freidgeim28-Nov-07 17:17
memberMichael Freidgeim28-Nov-07 17:17 
QuestionSecond Handle? Pin
Sameers (theAngrycodeR )22-Jul-07 2:40
memberSameers (theAngrycodeR )22-Jul-07 2:40 
GeneralSounds Good Pin
Sameers (theAngrycodeR )24-Mar-06 4:44
memberSameers (theAngrycodeR )24-Mar-06 4:44 
GeneralGood but Pin
jumacabo31-May-05 0:24
memberjumacabo31-May-05 0:24 
GeneralRe: Good but Pin
ashish_patil++31-May-05 1:42
memberashish_patil++31-May-05 1:42 
GeneralRe: Good but Pin
Roger J31-May-05 2:46
memberRoger J31-May-05 2:46 
GeneralRe: Good but Pin
ashish_patil++31-May-05 3:37
memberashish_patil++31-May-05 3:37 
GeneralRe: Good but Pin
Roger J31-May-05 3:42
memberRoger J31-May-05 3:42 
GeneralRe: Good but Pin
Anonymous31-May-05 7:37
sussAnonymous31-May-05 7:37 
GeneralRe: Good but Pin
Anonymous31-May-05 7:48
sussAnonymous31-May-05 7:48 
GeneralRe: Good but Pin
comeltan27-Sep-05 17:28
membercomeltan27-Sep-05 17:28 
GeneralRe: Good but Pin
jingking29-Jul-06 5:08
memberjingking29-Jul-06 5:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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 | Terms of Use | Mobile
Web01 | 2.8.161205.3 | Last Updated 22 Sep 2005
Article Copyright 2005 by ashish_patil++
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid