Inserting a label

In the next stage, add a label as well. Expand Toolbox and then type la, as shown in the following screenshot:

Figure 3.5.3. Select Label from Toolbox

Drag and drop a Label control into the markup. Now we have a Label tag. To separate the Label and TextBox controls vertically, insert a <br> tag. It should look as shown in the following screenshot:

Figure 3.5.4. Drag and drop Label from Toolbox

Let's look at this in the Design View. You have a box and a label under the box, as shown in the following screenshot:

Figure 3.5.5. ...

Get Beginning C# 7 Hands-On – The Core Language 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.