WebForms Switch Overview

The RadSwitch control (Figure 1) enriches the features, that ASP.NET Switch control has. Additionally, it provides events, supports Commands and numerous themes. RadSwitch is available as of R2 2021.

Telerik UI for ASP.NET AJAX Ninja image

The Switch is part of Telerik UI for ASP.NET AJAX, a professional grade UI library with 120+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Figure 1: RadSwitch configuration.

WebForms Switch Overview

Example 1: A basic example of a RadSwitch setup.

        <telerik:RadLabel runat="server" ID="RadLabel1" AssociatedControlID="RadSwitch1" Text="I agree to the Terms & Conditions.">
        </telerik:RadLabel>

        <telerik:RadSwitch ID="RadSwitch1" runat="server" Width="65px">
            <ToggleStates>
                <ToggleStateOn Text="Yes" />
                <ToggleStateOff Text="No" />
            </ToggleStates>
        </telerik:RadSwitch>

The default value of the AutoPostBack property is true, which means RadSwitch will POST the page to the server when checked/unchecked.

RadSwitch does not support a Classic render mode. Setting its RenderMode to Classic will default to the Lightweight render mode.

See Also

In this article