Hi,
I have multiple sliders inside a jQuery accordion control. I'm using custom CSS for the slider rails and handles. Problem is, when I try to move the handle, I get an error:
"Error: Sys.ArgumentException: Please set valid values for the height and width attributes in the slider's CSS classes
Parameter name: element size"
Then the sliders are replaced by the Slider textboxes and I get a NullReferenceException.
I don't need to change slider values using textboxes, so I don't want the textboxes to show at all. It seems like it is not allowing negative values for the sliders. But I need the range from minus 100 to positive 100.
Here's a sample of my CSS:
<style type="text/css">
.croplandhandle{
position: relative;
height:24px;
width:17px;
}
.croplandrail{
position: relative;
height: 20px;
width: 200px;
background: url('images/sliders/cropland_rail.png');
border-radius: 8px;
}
</style>
Here's a sample of my slider inside an accordion:
<div id="divLulcSliders">
<div style="text-align:left">Cropland</div>
<div style="text-align:center">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger controlid="CroplandSlider" eventname="TextChanged" />
</Triggers>
<ContentTemplate>
<asp:Label ID="CroplandSlider_BoundControl" runat="server" AssociatedControlID="CroplandSlider" />
<asp:TextBox ID="CroplandSlider" runat="server" AutoPostBack="True"
BorderStyle="None" Text="0" TabIndex="500" OnTextChanged="CroplandSlider_TextChanged" >
</asp:TextBox>
<ajaxToolkit:SliderExtender ID="CroplandSliderExtender" runat="server"
BehaviorID="CroplandSlider"
TargetControlID="CroplandSlider"
BoundControlID="CroplandSlider_BoundControl"
Minimum="-100"
Maximum="100"
Steps="1"
RailCssClass="croplandrail"
HandleCssClass="croplandhandle"
EnableHandleAnimation="true"
RaiseChangeOnlyOnMouseUp ="true"
HandleImageUrl="~/images/sliders/corn_handle.png">
</ajaxToolkit:SliderExtender>
</ContentTemplate>
</asp:UpdatePanel>
</div>
Appreciate any assistance.