Platforms
.Net 4.0
ACT Version 15.1.4.0 (and previously the 15.1.1.100 version)
The project exhibiting the problem is using Master/Child page configuration.
The Master page contains the ScriptManager, simply declared as:
```
<asp:ScriptManager ID="scriptmanager1" runat="server" />
```
The ACT is declared for the project within the web.config:
```
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
```
When using the SliderExtender control within a child page, and using custom graphics for the slider (_specifically_, setting the __RailCssClass__ property), we see the following error:
__Sys.ArgumentException: Please set valid values for the height and width attributes in the slider's CSS classes__
The slider does not appear on the page and control interaction stops due to the page error (not displayed to the user, only in Debug mode of Visual Studio).
When using the same control extender and custom rail within a different project (the only difference being it doesn't use the Master/Child page model), the control renders correctly and operates as expected.
If I remove the RailCssClass property, the error doesn't occur (but I don't get the custom graphic of course).
Mark up for the Slider Extender:
```
<asp:TextBox runat="server" id="txtBMI"></asp:TextBox>
<ajaxToolkit:SliderExtender ID="seBMIResult" runat="server"
TargetControlID="txtBMI"
Decimals="2" Maximum="50" Minimum="0" Length="500"
Orientation="Horizontal"
HandleImageUrl="~/images/Slider-pos-indicator2.png"
RailCssClass="BMIrailnonlinear" />
```
CSS markup (in a separate CSS file), where we can see that the height and width of the custom style ___are___ set:
```
.BMIrailnonlinear
{
position:relative;
background-image: url('../images/BMI-non-linear-scale.png');
height:25px;
width:500px;
}
```
If I use the Slider Extender __without__ setting the RailCssClass property, then the slider appears with the simple default rail (no good to us as the custom rail is displaying interpretive results within the image). This behaviour breaks the use of our app with the 15.x series of the ACT.
Comments: Hi Mikhail, Thanks for looking at this. I have managed to produce a new and (very) stripped-down version of my project that does still trigger the same issue. Usage on running: * Select gender. * Tick option for BMI (Weight/Height measurements). * Enter Height and Weight values, click the Calculate button. * Results _ought_ to be displayed using the slider control with the custom background graphic. As mentioned in original post, we have a second version of the UI with the same controls and extenders, but in a normal monolithic page delivery ASP.Net app (our internal clinicians view of the system), which works perfectly with the same ACT version. This mini-version is taken from our customer-facing version, with the real system protected by forms authentication - I've stripped out all of the additional features, including login control. Running in debug mode we still get the CSS width/height "error" reported.
.Net 4.0
ACT Version 15.1.4.0 (and previously the 15.1.1.100 version)
The project exhibiting the problem is using Master/Child page configuration.
The Master page contains the ScriptManager, simply declared as:
```
<asp:ScriptManager ID="scriptmanager1" runat="server" />
```
The ACT is declared for the project within the web.config:
```
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
```
When using the SliderExtender control within a child page, and using custom graphics for the slider (_specifically_, setting the __RailCssClass__ property), we see the following error:
__Sys.ArgumentException: Please set valid values for the height and width attributes in the slider's CSS classes__
The slider does not appear on the page and control interaction stops due to the page error (not displayed to the user, only in Debug mode of Visual Studio).
When using the same control extender and custom rail within a different project (the only difference being it doesn't use the Master/Child page model), the control renders correctly and operates as expected.
If I remove the RailCssClass property, the error doesn't occur (but I don't get the custom graphic of course).
Mark up for the Slider Extender:
```
<asp:TextBox runat="server" id="txtBMI"></asp:TextBox>
<ajaxToolkit:SliderExtender ID="seBMIResult" runat="server"
TargetControlID="txtBMI"
Decimals="2" Maximum="50" Minimum="0" Length="500"
Orientation="Horizontal"
HandleImageUrl="~/images/Slider-pos-indicator2.png"
RailCssClass="BMIrailnonlinear" />
```
CSS markup (in a separate CSS file), where we can see that the height and width of the custom style ___are___ set:
```
.BMIrailnonlinear
{
position:relative;
background-image: url('../images/BMI-non-linear-scale.png');
height:25px;
width:500px;
}
```
If I use the Slider Extender __without__ setting the RailCssClass property, then the slider appears with the simple default rail (no good to us as the custom rail is displaying interpretive results within the image). This behaviour breaks the use of our app with the 15.x series of the ACT.
Comments: Hi Mikhail, Thanks for looking at this. I have managed to produce a new and (very) stripped-down version of my project that does still trigger the same issue. Usage on running: * Select gender. * Tick option for BMI (Weight/Height measurements). * Enter Height and Weight values, click the Calculate button. * Results _ought_ to be displayed using the slider control with the custom background graphic. As mentioned in original post, we have a second version of the UI with the same controls and extenders, but in a normal monolithic page delivery ASP.Net app (our internal clinicians view of the system), which works perfectly with the same ACT version. This mini-version is taken from our customer-facing version, with the real system protected by forms authentication - I've stripped out all of the additional features, including login control. Running in debug mode we still get the CSS width/height "error" reported.