Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Input / First Look

TextBoxSettings
Single line:
Password:
Multi-line:
NumericTextBoxSettings
Currency:
Number:
Percent:
DateInputSettings
Date1:  MM/dd/yyyy
Date2:  dd MMMM yyyy
Date3:  dddd hh:mm
RegExpTextBoxSettings
Email:
SSN:
Phone:

  • The RadInputManager offers an easy and intuitive way to extend a standard ASP.NET TextBox, and without any extra custom code, introduce much functionality, normally related to a Telerik RadInput control.

    Within the RadInputManager, there are four types of settings which could be added:

    • telerik:TextBoxSetting - the targeted text box will exhibit behavior like a normal RadTextBox
    • telerik:NumericTextBoxSetting - the targeted textbox will be accepting numeric input
    • telerik:DateInputSetting - the targeted text box will be accepting input in a date format
    • telerik:RegExpTextBoxSetting - the targeted text box will be accepting characters corresponding to a specified regular expression

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="Input_Examples_RadInputManager_FirstLook_Default" %>

    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag ID="Headtag1" runat="server"></qsf:HeadTag>
    </head>
    <body class="BODY">
        <form id="mainForm" method="post" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB"></qsf:Header>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <!-- content start -->
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Fieldset" />
        <div style="float: left" id="Div1" runat="server">
            <fieldset id="FieldSet1" style="width: 300px; height: 130px;">
                <legend>TextBoxSettings</legend>
                <dl>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 80px;">
                                    Single line:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox1" runat="server" Text="John Vu" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 80px;">
                                    Password:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox2" runat="server" TextMode="Password" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 80px;">
                                    Multi-line:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox3" runat="server" TextMode="MultiLine" Height="25px" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                </dl>
            </fieldset>
        </div>
        <div style="float: left">
            <fieldset id="FieldSet2" style="width: 300px; height: 130px;">
                <legend>NumericTextBoxSettings</legend>
                <dl>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    Currency:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox4" runat="server" Text="77" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    Number:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox5" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    Percent:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox6" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                </dl>
            </fieldset>
        </div>
        <div style="float: left">
            <fieldset id="FieldSet3" style="width: 300px; height: 130px;">
                <legend>DateInputSettings</legend>
                <dl>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    Date1:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox7" runat="server" Text="12/25/2009" Width="100px" />&nbsp;MM/dd/yyyy
                                </td>
                            </tr>
                        </table>
                    </dd>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    Date2:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox8" runat="server" Width="100px" />&nbsp;dd MMMM yyyy
                                </td>
                            </tr>
                        </table>
                    </dd>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    Date3:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox9" runat="server" Width="100px" />&nbsp;dddd hh:mm
                                </td>
                            </tr>
                        </table>
                    </dd>
                </dl>
            </fieldset>
        </div>
        <div style="float: left">
            <fieldset id="FieldSet4" style="width: 300px; height: 130px;">
                <legend>RegExpTextBoxSettings</legend>
                <dl>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    Email:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox10" runat="server" Text="johnvu@telerik.com" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    SSN:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox11" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                    <dt></dt>
                    <dd>
                        <table>
                            <tr>
                                <td style="width: 50px;">
                                    Phone:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox12" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </dd>
                </dl>
            </fieldset>
        </div>
        <telerik:RadInputManager ID="RadInputManager1" runat="server">
            <telerik:TextBoxSetting BehaviorID="TextBoxBehavior1" EmptyMessage="type here" Validation-IsRequired="true">
                <TargetControls>
                    <telerik:TargetInput ControlID="Div1" />
                </TargetControls>
            </telerik:TextBoxSetting>
            <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type.."
                Type="Currency" Validation-IsRequired="true">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox4" />
                </TargetControls>
            </telerik:NumericTextBoxSetting>
            <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior2" EmptyMessage="type.."
                Type="Number">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox5" />
                </TargetControls>
            </telerik:NumericTextBoxSetting>
            <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior3" EmptyMessage="type.."
                Type="Percent" DecimalDigits="0">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox6" />
                </TargetControls>
            </telerik:NumericTextBoxSetting>
            <telerik:DateInputSetting BehaviorID="DateInputBehavior1" Validation-IsRequired="true"
                DateFormat="MM/dd/yyyy">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox7" />
                </TargetControls>
            </telerik:DateInputSetting>
            <telerik:DateInputSetting BehaviorID="DateInputBehavior2" DateFormat="dd MMMM yyyy">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox8" />
                </TargetControls>
            </telerik:DateInputSetting>
            <telerik:DateInputSetting BehaviorID="DateInputBehavior3" DateFormat="dddd hh:mm">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox9" />
                </TargetControls>
            </telerik:DateInputSetting>
            <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior1" Validation-IsRequired="true"
                ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" ErrorMessage="Invalid Email">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox10" />
                </TargetControls>
            </telerik:RegExpTextBoxSetting>
            <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior2" ErrorMessage="Enter Social Security Number here"
                Validation-IsRequired="true" ValidationExpression="\d{3}-\d{2}-\d{4}">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox11" />
                </TargetControls>
            </telerik:RegExpTextBoxSetting>
            <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior3" ValidationExpression="[0-9]{6,}"
                ErrorMessage="Enter more than 6 figures">
                <TargetControls>
                    <telerik:TargetInput ControlID="TextBox12" />
                </TargetControls>
            </telerik:RegExpTextBoxSetting>
        </telerik:RadInputManager>
        <!-- content end -->
        <qsf:Footer ID="Footer1" runat="server"></qsf:Footer>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451