New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Database-friendly Value setting

The RadSlider control provides DbValue property - by using it you can set the Value in a database-friendly way no matter the value in the database is null or a type which will need a convert before being set to the Value property.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="vb" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Slider.DbValue.DefaultVB"CodeFile="DefaultVB.aspx.vb"  %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-narrow no-bg">
        <div class="equalizer">
            <telerik:RadSlider RenderMode="Lightweight" ID="RadSliderVolume" runat="server" Value='30' Orientation="Horizontal" CssClass="volume"
                MinimumValue="0" MaximumValue="50" LargeChange="10" TrackPosition="TopLeft" ShowIncreaseHandle="false"
                ShowDecreaseHandle="false" Width="240" ItemType="Tick" Height="50" Skin="Default">
            </telerik:RadSlider>
            <telerik:RadListView ID="RadListViewEqualizer" runat="server" OnNeedDataSource="RadListViewEqualizer_NeedDataSource"
                Width="230">
                <ItemTemplate>
                    <td style="width: 30px;">
                        <telerik:RadSlider RenderMode="Lightweight" ID="RadSliderEqualizer" IsDirectionReversed="true" runat="server" DbValue='<%# Eval("Value")%>'
                            Orientation="Vertical" MinimumValue="0" MaximumValue="30" ShowIncreaseHandle="false"
                            Height="160" ShowDecreaseHandle="false" ItemType="Tick" Skin="Default">
                        </telerik:RadSlider>
                    </td>
                </ItemTemplate>
                <LayoutTemplate>
                    <table cellspacing="0">
                        <tr>
                            <td id="itemPlaceholder" runat="server"></td>
                        </tr>
                    </table>
                </LayoutTemplate>
            </telerik:RadListView>
        </div>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance