ASP.NET Tutorial

.NET Framework

ASP.NET Introduction

ASP.NET Web Forms

Standard Controls

Label Control

TextBox Control

Image Control

Button Controls

Redirecting User

Using HyperLinks

RadioButton Control

RadioButtonList

CheckBox Control

CheckBoxList Control

DropDownList

ListBox Control

ImageMap Control

Event-Driven Programming

ASP.NET Page Structure

IsPostBack

Master Page

View State

Visibility of Controls

Formatting Controls

Applying CSS

Dynamic CSS

Using Style Class

Themes and Skins

Panel Control

PlaceHolder Control

AdRotator Control

Calendar Control

File Upload, Virtual Path

Validation Controls

Page Navigation

User Control

Separating Code-Presentation

Overview of ADO.NET

Data Binding

DataBinding List Control

Textbox Control in ASP.NET

TextBox is use to accept all kinds of textual data from users, including single line, multi-line and password type.

Table lists the important properties, methods, and events of TextBox control.

Property Description
AutoPostBack If it is True, the form is posted back automatically whenever the contents of the text box are changed.
Columns Indicates the horizontal size of the text box in characters. The TextBox control has no Size property.
MaxLength Indicates the maximum number of characters you can enter in the text box. Does not work with multi-line text boxes.
ReadOnly Indicates whether the contents of the text box can be changed.
Rows Indicates the vertical size of a multi-line text box in characters.
Text Gets or sets the text in the text box.
TextMode Indicates type of text box: SingleLine, MultiLine, Password
Wrap If it is True, word wrap is enabled for text in a multi-line text box.

Output:


When the AutoPostBack property of the TextBox control is True, the form containing the text box is automatically posted whenever the text in the text box is changed.