CheckBox - Label Integration

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB
Instead of setting the Text property of RadCheckBox to configure the text that appears after the checkbox, you can use RadLabel for this purpose. Just set the AssociatedControlID property of the label control to the ID of the checkbox control it will be attached to, as shown in the example above.
  • DefaultCS.aspx
  • styles.css
<%@ Page Language="C#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="Stylesheet" type="text/css" href="styles.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-thin" style="text-align: center">
        <telerik:RadCheckBox runat="server" ID="RadCheckBox1" AutoPostBack="false">
        </telerik:RadCheckBox>
        <telerik:RadLabel runat="server" ID="RadLabel1" AssociatedControlID="RadCheckBox1" Text="I agree to the Terms & Conditions.">
        </telerik:RadLabel>
    </div>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?