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

Render Modes

Phone Contract

  • Render mode
Change Render Mode

Lightweight vs. Classic Rendering
Classic Lightweight
Markup Size
  • RadTextBox
  • RadMaskedTextBox
  • RadNumericTextBox
  • RadDateInput
  • 2.40 KB
  • 2.71 KB
  • 3.10 KB
  • 3.40 KB
  • 2.94 KB
  • 3.25 KB
  • 3.93 KB
  • 3.94 KB
CSS Size 7.29 KB 4.79 KB
Image Sprite 2.16 KB 0 KB*

This demo showcases the two different rendering modes of Telerik's ASP.NET Input control: Classic and Lightweight.

  • Classic rendering is the long-standing rendering mode of the control in which its layout is implemented using table elements.
  • Lightweight rendering leverages HTM5 and CSS3 to deliver semantic HTML to the browser, but the control may lose its rounded corners, gradients and shadows in non-modern browsers. With this rendering, some table elements in the control layout are replaced with generic elements, such as div and span.

There is also a Native render mode option inherited directly from RenderMode. As RadInput does not have a specific HTML element, the Native render mode will have the same effect as the Classic one.

The default render mode of the control is Classic and you have the option to either explicitly set it to Lightweight or leverage the Auto mode to have the control choose the best rendering based on the user's browser.

Note: In order to provide optimal experience for your end users, we recommend that you use only one type of render mode for a control on a given page. For example, if you have two instances of RadInput on the page, it will be best if both of them use the same render mode.

Note: The Material skin is available only for the modern Lightweight render mode. Change the skin or the mode to properly visualize the demonstrated control.

Note on the statistics::
The markup size is calculated automatically in the code-behind by rendering a simple RadCalendar instance on a blank page with the settings from its configurator panels.
* - The Lightweight RenderMode of RadInput uses WebFont instead of image sprites for its embedded icons which offers more benefits over the images.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page CodeFile="DefaultCS.aspx.cs" Language="c#" Inherits="Telerik.Web.Examples.Input.RenderMode.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div id="Div1" class="demo-containers" runat="server">
        <div class="demo-container" runat="server">
            <asp:Panel ID="Panel1" runat="server">
                <h3>Phone Contract</h3>
                <telerik:RadTextBox RenderMode="Lightweight" ID="RadTextBox1" runat="server" Width="100%" LabelWidth="40%" Label="Your Name"></telerik:RadTextBox><br />
                <telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox1" Width="100%" LabelWidth="40%" runat="server" Mask="(###)-######" Label="Phone Number"></telerik:RadMaskedTextBox><br />
                <telerik:RadNumericTextBox RenderMode="Lightweight" ID="RadNumericTextBox1" runat="server" Width="100%" LabelWidth="40%" Label="Monthly Fee" MaxLength="2">
                    <NumberFormat DecimalDigits="2" />
                </telerik:RadNumericTextBox><br />
                <telerik:RadDateInput RenderMode="Lightweight" ID="RadDateInput1" runat="server" Width="100%" LabelWidth="40%" Label="Starting date"></telerik:RadDateInput><br />
                <asp:RequiredFieldValidator ID="PickerRequiredFieldValidator" runat="server" Display="Dynamic"
                    CssClass="validator" ControlToValidate="RadDateInput1"
                    ErrorMessage="Please, select a date!"></asp:RequiredFieldValidator>
    <qsf:ConfiguratorPanel Expanded="true" runat="server" ID="ConfiguratorPanel1" Title="Render mode">
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" Title="Change Render Mode" runat="server" Size="Medium">

                    <ul class="fb-group">

                            <qsf:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True"
                                <asp:ListItem Value="Lightweight" Text="Lightweight" Selected="True"></asp:ListItem>
                                <asp:ListItem Value="Classic" Text="Classic"></asp:ListItem>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn2" Title="Lightweight vs. Classic Rendering" runat="server" Size="Wide">
                    <table class="table">
                                <th><span>Markup Size</span>
                                    <ul class="removeDots">
                                    <ul class="removeDots moveDown">
                                            <asp:Label ID="ClassicSizeTextBox" runat="server"></asp:Label></li>
                                            <asp:Label ID="ClassicSizeMaskedTextBox" runat="server"></asp:Label></li>
                                            <asp:Label ID="ClassicSizeNumericTextBox" runat="server"></asp:Label></li>
                                            <asp:Label ID="ClassicSizeDateInput" runat="server"></asp:Label></li>
                                    <ul class="removeDots moveDown">
                                            <asp:Label ID="LightweightSizeTextBox" runat="server"></asp:Label></li>
                                            <asp:Label ID="LightweightSizeMaskedTextBox" runat="server"></asp:Label></li>
                                            <asp:Label ID="LightweightSizeNumericTextBox" runat="server"></asp:Label></li>
                                            <asp:Label ID="LightweightSizeDateInput" runat="server"></asp:Label></li>
                                <th>CSS Size</th>
                                <td>7.29 KB</td>
                                <td>4.79 KB</td>
                                <th>Image Sprite</th>
                                <td>2.16 KB</td>
                                <td>0 KB*</td>

Support & Learning Resources

Find Assistance