Hour 10. Using Text Boxes to Collect Input
In this hour, we will cover
In Hour 9, "Web Form Basics," we examined how to collect user input through an ASP.NET web page. To summarize, we saw that in order to retrieve user input, we need to use a Web Form. Inside the Web Form, Web controls are placed to allow user input.
For example, in the preceding hour we looked at a BMI Calculator ASP.NET page. For this web page, users needed to enter two pieces of information: their height and weight. So that users could enter this information, we used two TextBox Web controls.
The TextBox Web control contains a number of properties that can be set to specify the appearance of the resulting text box. For example, the TextMode property of the TextBox Web control can be set to MultiLine, which will create a text box with multiple lines; or it can be set to Password to show a series of asterisks when the user types in a value. The Columns property can be adjusted to specify how many columns wide the text box should be.
Now we will look at the various TextBox Web control properties and the visual effects they have.