Вопрос

I am relatively new to ASP.NET but have some WinForms experience.

Basically I want to use 2 types of slider bar controls:

  1. Basic sliderbar where the user drags one thumb and I can pull the value from the control.
  2. A sliderbar with 3 thumbs for minimum, predicted and maximum. The predicted value must stay within the min and max values. I need to able to pull all three values from this control. (something like http://jqueryui.com/slider/#range but with a third thumb in the middle)

Other points to mention, these controls need to be created dynamically as the number of them will depend on values saved in an SQL database. Also, I have created controls that work in WinForms but I doubt I can port these over to be used in ASP.NET?

Has anyone had experience using sliderbars in ASP.NET? Are there FREE packages that can be used to do what I described?

Many Many thanks for any help, support or advice you can provide!!

Это было полезно?

Решение

Im thinking you can use the Jquery Control, my only concern is when you say

A sliderbar with 3 thumbs for minimum

Does this mean that you might have 4,5 or more thumbs in the control?

In my opinion you can use the JQuery control by having the Min and Max values declared from your database and then your predicted value will be your thumb, then use JQuery to get all 3 values, take a look at the API doc of JQuery http://api.jqueryui.com/slider/#option-min

$( ".selector" ).slider({ max: 50 });
$( ".selector" ).slider({ min: 10 });
// getter
var max = $( ".selector" ).slider( "option", "max" );
// getter
var min = $( ".selector" ).slider( "option", "min" );

// getter
var value = $( ".selector" ).slider( "option", "value" );
// setter
$( ".selector" ).slider( "option", "value", 10 );

Unless I am not understanding correctly your question, this control should work for you.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top