In case we need to associate a text label with any control so that clicking on the text focus on the control (eg. TextBox), we can use this approach.
<p>
<asp:Label ID="lblName" runat="server" AssociatedControlID="txtFirstName" Text="First Name: " />
<asp:TextBox ID="txtFirstName" runat="server" />
</p>
AssociateControlID property of the Label control can be specified to the TextBox id that associates the Label to the TextBox. Clicking on the Label control focuses the TextBox.
Views: 3681 | Post Order: 12