the slider gives you the chance to add a minimum, maximum values as well the a step...
try this code below and implement it in your ASP code
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"></script>
<link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#slider { margin: 10px; width: 300px; }
body { font-size: 20px; }
</style>
<script type="text/javascript">
$(document).ready(function(){
$("pre a").bind("click", function() { // show current hidden value
alert($("#prdRange").val());
});
$("#slider").slider({
min: 40, // minimum amount
max: 80, // maximum amount
step: ((80 - 40) / 10), // steps ...
slide: function(event, ui) { // fire this when change
$("#lbl").text(ui.value + ",00 €");
$("#prdRange").val(ui.value);
}
});
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="slider"></div>
<span id="lbl">40,00 €</span>
<input type="hidden" id="prdRange" value="40" />
<pre>min: 40 Euros, max: 80 Euros, <a href="#">range chosen</a></pre>
</body>
</html>
all you have to do is change the values with the asp value when you load the page like
$("#slider").slider({
min: <%= ProductMinValue %>, // minimum amount
max: <%= ProductMaxValue %>, // maximum amount
step: <%= ProductStepValue %>, // steps ...
slide: function(event, ui) { // fire this when change
$("#lbl").text(ui.value + ",00 €");
$("#prdRange").val(ui.value);
}
});
see this code live in JSBin (you can edit it by adding /edit to the URL...)