Thursday, 23 February 2012

.Net Beginners : How to associate an asp:Label with a TextBox or other Form control?

To associate an asp:Label to From controls means , when clicking on asp:Label cursor focus move to that associate controls.

In web form there is label and text box, this label is associated with textbox so when click on label cursor focus move to text box.

<asp:Label runat="server" ID="lblProductName" Text="Product Name :" AssociatedControlID="txtProductName"></asp:Label>
<asp:TextBox runat="server" ID="txtProductName"></asp:TextBox>

No comments:

Post a Comment