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

WebForms TextBox Overview

Username:  
Password:  
Comment:

Telerik RadTextBox is a highly customizable component for text inputs in ASP.NET applications. It shares the common properties of all RadInput controls, including support for skins, styles for different states, empty message support, conditional postback on text change, flexible caret and button positioning, labels, and so on.

About RadTextBox for ASP.NET AJAX

When you need data entry control combined with strict validation, Telerik TextBox control for ASP.NET AJAX is the perfect match. RadTextBox accept all characters (alphabet, numeric and symbols) and can also be used for entering passwords. The control exposes the Password Strength Checker feature which allows you to specify your custom criteria for password strength and visualize an indicator to inform the user how strong is the typed password according to this criteria.

RadTextBox and 120+ other controls are part of UI for ASP.NET AJAX, a comprehensive toolset taking care of the common functionality of your application, while leaving you with more time to work on its business logic.

Key Features

  • Rich client-side API
  • Keyboard and mouse wheel support.
  • The ability to add labels and buttons that are associated with the input control.
  • Single-line, password, and multi-line modes.
  • AutoComplete support in participating browsers.
  • MaxLength property to define the max length of characters allowed to be entered.
  • Empty message support.
  • Client/Server side data validation.
  • Advanced Skinning - The visual appearance of the Input control can be easily customized through skins.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="vb" AutoEventWireup="false"  Inherits="Telerik.TextBoxExamples.Overview.DefaultVB" CodeFile="DefaultVB.aspx.vb"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html>
<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" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function pageLoad() {
                setTimeout(function () {
                    document.getElementById("<%=ResultLabel.ClientID%>").innerHTML = "";
                }, 3000);
            }
        </script>
    </telerik:RadCodeBlock>

    <div class="demo-containers">
        <div class="demo-container wrapper">
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" CssClass="demo-container demo-content">
                <asp:Label ID="Label1" runat="server" Text="Username:" Width="80px"></asp:Label>
                <telerik:RadTextBox RenderMode="Lightweight" runat="server" ID="RadTextBox1" Width="200px" EmptyMessage="Enter username"></telerik:RadTextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadTextBox1" ErrorMessage="!" ForeColor="Red"></asp:RequiredFieldValidator>
                <br />
                <asp:Label ID="Label2" runat="server" Text="Password:" Width="80px"></asp:Label>
                <telerik:RadTextBox RenderMode="Lightweight" runat="server" ID="RadTextBox2" Width="200px" TextMode="Password"></telerik:RadTextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="RadTextBox2" ErrorMessage="!" ForeColor="Red"></asp:RequiredFieldValidator>
                <br />
                <asp:Label ID="Label3" runat="server" Text="Comment:" Width="80px"></asp:Label>
                <telerik:RadTextBox RenderMode="Lightweight" runat="server" ID="RadTextBox3" Width="200px" EmptyMessage="Enter comment" TextMode="MultiLine" Height="100px" Resize="None"></telerik:RadTextBox><br />

                <asp:Label runat="server" ID="ResultLabel" CssClass="resultLabel"></asp:Label>
                <telerik:RadButton RenderMode="Lightweight" runat="server" ID="RadButton1" Text="Sign in" CssClass="submitButton" Width="100px" Style="float:right;" OnClick="RadButton1_Click"></telerik:RadButton>
            </telerik:RadAjaxPanel>
        </div>
    </div>

    </form>
</body>
</html>

Support & Learning Resources

Find Assistance