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

Client-side Programming Overview

RadSwitch provides a flexible client-side API. You can easily interact with the switch in the browser using the RadSwitch client-side object. In addition to a variety of client-side events, the client-side object model lets you achieve complicated tasks while avoiding unnecessary post-backs.

Getting the RadSwitch client-side object

RadSwitch creates a client-side object with the ClientID of the button. You can obtain the reference using the following JavaScript code:

var switchObj = $find("<%= RadSwitch1.ClientID %>");

or

var switchObj = $telerik.findswitch("<%= RadSwitch1.ClientID %>");

See Also

In this article