Set decimal step value in Ajax Control ToolKit SliderExtender in ASP.Net

nauna
 
on Jan 30, 2021 06:12 AM
Sample_487550.zip
940 Views

hello

I have this slider extender

<cc1:SliderExtender ID="SliderExtender2" BehaviorID="sliderBehavior" runat="server" RailCssClass="ajax__slider_h_rail test" 
    TargetControlID="txtDisplayValue" Steps="8" Decimals="1"  Maximum="8" Minimum="1.5" BoundControlID="lblnumberofhours">  
</cc1:SliderExtender>
<asp:TextBox ID="txtDisplayValue" runat="server" Text="1.5" OnTextChanged="txtDisplayValue_TextChanged" AutoPostBack="true" ></asp:TextBox>
<asp:Label ID="lblnumberofhours" runat="server" Text="0"></asp:Label>  

I want achieve like this

Start from 1.5 hours, then change in 1-hour increments (1.5, 2, 3, 4, 5, 6, 7, 8). 

Please advice

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Jan 30, 2021 07:11 AM

Hi nauna,

What you are looking is not possible.

You can use below code to step by 0.5.

<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
<asp:TextBox ID="txtDisplayValue" runat="server" AutoPostBack="true" Text="1.5" />
<cc1:SliderExtender ID="SliderExtender2" runat="server" Steps="15" Decimals="1" Maximum="8" Minimum="1"
    TargetControlID="txtDisplayValue" BoundControlID="lblnumberofhours" />
<asp:Label ID="lblnumberofhours" runat="server" />