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
TextBox1.TextMode = TextBoxMode.MultiLine
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.
TextBox1.MaxLength = 5
TextBox1.MaxLength = 5;
The following ASP.NET program retrieve user input from a TextBox control and display it to a Label control.
Click the following links to see full source code