$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
TextBox Input in ASP.NET
Home > How to > Input TextBox

KT.UI SDK offers users the standard and robust Input components, including PerTextBox Control, which can be fully used to allow users to enter and input text values. What’s more, common textbox properties can be completely customized, for instance, users are free to select the option for empty message, support for adjusting TextBox max length, choice for adding label to textbox and option for multi-line text mode as well as password mode by calling and using simple to use methods and sample ASP.NET codes.
In following texts, we will talk about how to set and specify TextBox of Input control for ASP.NET AJAX:
  • How to use demo ASP.NET codes to set empty message for TextBox
  • How to use demo ASP.NET codes to adjust TextBox’ max length
  • How to use demo ASP.NET codes to add and customize label to TextBox
  • How to use demo ASP.NET codes to switch TextBox into multi-line inputting mode
  • How to use demo ASP.NET codes to set TextBox property as password mode that can behave in single mode
For detailed guides on setting and defining Input TextBox control within C# application, please go to the right web page.

ASP.NET Codes for Setting Empty Message

When you set the AutoPostBack attribute as True, PerInput TextBox control can provide the tool for inputting empty message. Specific demo ASP.NET codes are displayed below.
<kettic:PerTextBox ID="PerTextBox1" runat="server" 
EmptyMessage="please enter" AutoPostBack="True">

ASP.NET Codes for Setting Max Length

With the rich and flexible support of KT.UI PerInput TextBox component, users are able to set and adjust the allowable inputting max length both in single-line mode and multi-line mode based on actual needs.
<kettic:PerTextBox ID="PerTextBox1" runat="server" MaxLength="100"

ASP.NET Codes for Setting Label

Besides setting the basic PerInput TextBox max length, if necessary, users are able to add and customize label before TextBox within ASP.NET programming application. We also offer the entire sample codes for this property setting.
<kettic:PerTextBox ID="PerTextBox1" runat="server" 
Label="text box" AutoPostBack="True">

ASP.NET Codes for Setting Multi-Line

If you want to use PerInput TextBox component in multi-line mode, users just need to set the TextBox property to Multi-Line. When in this mode, the rows and columns of input texts can be automatically defined and displayed precisely. In addition, the Resize attribute of TextBox supports the resize modes, such as "None", "Both", "Vertical", "Horizontal". Besides, single-line TextBox mode is certainly compatible.
<kettic:PerTextBox Width="195px" ID="PerTextBox1" runat="server" 
TextMode="MultiLine" Resize="Both" LabelAutoPostBack="true">

ASP.NET Codes for Setting Password Mode

If necessary, users can choose to input TextBox in Password mode, and the texts input in password mode are in single-line mode.
<kettic:PerTextBox ID="PerTextBox1" runat="server" 
Label="password" TextMode="Password" AutoPostBack="True">