In ASP.NET 1.x the label control was pretty boring. It basically placed whatever
text it was assigned inside a <span> tag and that was about it.
This led many developers to realize you could get the same results using the
literal control which doesn't add the annoying <span> tag.
In ASP.NET 2.0, the label control has been given a new lease on life with the
inclusion of the AssociatedControlID property. This property allows you to
associate the label control with the content that it is intended to describe.
Take a look at the following code snippet.
Now there's no confusion about what the label describes. Better yet, this association
is carried over to the HTML that is rendered as well. Instead of a <span>
tag, the label will now be rendered as an HTML <label> tag instead.
Not only is this rendering more accurate, it also has the added benefit that if a user
clicks on the label, the associated control will automatically get focus. In the example
above, clicking on the "Name:" text will automatically place the cursor in the
textbox so the user can enter their name.