Chapter 1. Using Basic Web Server Controls

In This Chapter

Identifying features with labels

Giving the user a place for input with text boxes

Simplifying control with buttons

Providing options with check boxes

Offering choices with radio buttons

Using pictures to start processes with image controls

Controls are the building blocks of ASP.NET pages. In fact, about half of ASP.NET programming consists of dragging controls from the toolbox onto the page and tweaking the properties of the controls to get them just right.

This chapter presents a basic subset of ASP.NET controls that you’ll use in many, if not most, of the applications you work on. In particular, you get a look at six different controls and how to use them: Label, TextBox, Button, CheckBox, RadioButton, and Image. In addition, this chapter introduces an important feature called View State that’s available for all ASP.NET controls.

Using Basic Web Server Controls

All code listings used in this book are available for download at www.dummies.com/go/aspnetaiofd. In addition, although the code listing in this chapter is written in C#, the VB.NET version is available for download too.

Using Label Controls

A Label control displays text to identify a feature on a Web page. For example, the page in Figure 1-1 shows four Label controls. The first provides instructions for the user. The next two identify input fields the user should enter data into. The fourth label ...

Get ASP.NET 2.0 All-In-One Desk Reference For Dummies® 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.