Summary

In this hour we examined how user input can be collected in an ASP.NET Web page. We started by examining the HTML tags needed to collect user input, which include a number of <input> tags for each textbox, checkbox, radio button, or drop-down list, and a <form> tag, inside which the <input> tags must be enclosed. Additionally, a submit button is needed.

With ASP.NET Web pages we do not need to worry about creating these HTML tags by hand. Rather, we can simply use appropriate Web controls, such as the TextBox Web control for displaying a textbox, a CheckBox Web control for displaying a checkbox, and so on. To collect a user's input, these Web controls must be placed inside a Web form. A Web form, as we saw, is an HTML control of the form, ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.