I have a Javascript rails slider with changeable value, i want to bind its value to a asp label and use in in code behind, thanks for your help.
lable:
<asp:Label ID="Lbl1" runat="server" Text="Label" Visible="False"></asp:Label>
javascript:
<script type="text/javascript">
$("#appearance7").roundSlider({
radius: 70,
width: 8,
handleSize: "+16",
handleShape: "dot",
sliderType: "min-range",
value: 5,
max: 10,
mouseScrollAction: true,
min: 1
});
</script>
the current value is "5" but it can be changed by user and i want to assign this value to asp label.
$("#appearance7").roundSlider({ radius: 70, width: 8, handleSize: "+16", handleShape: "dot", sliderType: "min-range", value: 5, max: 10, mouseScrollAction: true, min: 1, change: "onValueChange" }); function onValueChange (e) { $("#Lbl1").val(e.value); }
<asp:Label ID="Lbl1" runat="server" Text="Label" Visible="False" ClientIDMode="Static"></asp:Label>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.