The TextBox server control is an input control which can be used to accept user input.

By default Texboxes comes with a single line of text , you can also use the TextBox control to display a multiline text box or a text box that masks user input by changing the value of the TextMode property to TextBoxMode.MultiLine
vb.net TextBox1.TextMode = TextBoxMode.MultiLine
C# TextBox1.TextMode = System.Web.UI.WebControls.TextBoxMode.MultiLine;
If you want to limit the user input to a specified number of characters, set the MaxLength property.
vb.net TextBox1.MaxLength = 5
C# TextBox1.MaxLength = 5;
The following ASP.NET program retrieve user input from a TextBox control and display it to a Label control.
Defaul.aspx
Untitled Page
Click the following links to see full source code
C# Source Code
VB.NET Source Code
ASP.NET Web Controls - Related Contents