How to: Use Label Web Server Controls as Captions
You can use the Label Web server control to act as an active caption in front of another Web server control, such as a TextBox control. The Label control cannot receive the user input focus. However, by associating the Label control with another control, users can navigate to the associated control by simultaneously pressing the ALT key with an access key that you define for the Label control.
To use a Label Web server control as a caption
The following example shows how to use a Label control as a caption for a TextBox control. When the page renders, users will be able to press ALT+N to navigate to the text box. The letter N in the Label is underlined.
<asp:Label AccessKey="N" AssociatedControlID="TextBox1" ID="Label1" runat="server" Text="<u>N</u>ame:"> </asp:Label> <asp:TextBox ID="TextBox1" runat="server" />