My Technical Notes

Monday, 12 August 2013

AJAX Toolkit SliderExtender

The SliderExtender is a slider control with which the user can select a value between a range.

The following is an example:


<ajaxToolkit:SliderExtender runat="server"
    ID="SliderExtender1"
    TargetControlID="SampleInput"
    BoundControlID="SampleLabel"
    Minimum="0"
    Maximum="100"
    Orientation="Horizontal"
    />
                
<asp:TextBox runat="server" ID="SampleInput" />
<asp:Label runat="server" ID="SampleLabel" />

A bit of CSS is needed to make the slider appear at the same level as the label which displays the select value:


.ajax__slider_h_rail
{
    float: left;
    margin-right: 10px;
}

No comments: