Your shopping cart is empty!
The TextBox control generates single-line text boxes. The text that a user enters in a text box is stored in the Text property, which is inherited from the TextControl base class.
Creates single-line and multiline text boxes.
The TextBox server control is an input control that lets the user enter text. By default, the TextMode property is set to SingleLine, which creates a text box with only one line. You can also set the property to MultiLine or Password. MultiLine creates a text box with more than one line. Password creates a single-line text box that masks the value entered by the user.
The display width of the text box is determined by its Columns property. If the text box is a multiline text box, the display height is determined by the Rows property.
Use the Text property to determine the contents of the TextBox control. You can limit the number of characters that can be entered in the control by setting the MaxLength property. Set the Wrap property to true to specify that the contents of the cell should automatically continue on the next line when the end of the text box is reached.
The following shows a sample declaration for a TextBox control in an .aspx file. The control is multiline text box that displays a maximum of ten lines. The text is formatted in Arial font if the browser supports fonts for controls. The method txtLogin_Changed is bound to the control's TextChanged method.
The TextBox server control is an input control that lets the user enter text. By default, the TextMode property of the control is set to TextBoxMode.SingleLine, which displays a single-line text box. However, 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 or TextBoxMode.Password, respectively. The text displayed in the TextBox control is specified or determined by using the Text property.
The TextBox control contains several properties that allow you to control the appearance of the control. The display width of the text box, in characters, is determined by its Columns property. If the TextBox control is a multiline text box, the number of rows it displays is determined by the Rows property. To display text that wraps within the TextBox control, set the Wrap property to true.
You can also specify how data is entered in the TextBox control by setting a few properties. To prevent the text displayed in the control from being modified, set the ReadOnly property to true. If you want to limit the user input to a specified number of characters, set the MaxLength property.
public class TextBox : WebControl, IPostBackDataHandler,
The TextBox type exposes the following members.
copyright © 2019 Vskills
Developed by Highpixel