asp.netvb.netwebusercontrol

Multiple AssociatedControlID's on label


Is it possible to associate more than one ID to an "AssociatedControlID" field on an asp.net label?

Example:

<asp:Label ID="lblColour" runat="server" AssociatedControlID="txtColourFront, txtColourBack, txtColour" Text="ColourFront" />
<asp:TextBox ID="txtColourFront" runat="server" />
<asp:TextBox ID="txtColourBack" runat="server" />
<asp:TextBox ID="txtColour" runat="server" />

Solution

  • No its not possible.

    This will be rendered as the for attribute for a label element in HTML.

    This element doesn't accept multiple for attributes.