0

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" />
iswinky
  • 1,951
  • 3
  • 16
  • 47
  • I know this is old, but I came across this looking for an answer to a similar question I had. I found the answer given in another question: https://stackoverflow.com/questions/9004307/two-input-fields-inside-one-label Using a fieldset and legend would probably be the best route in this scenario to group the textboxes. – Blaine Young Aug 01 '18 at 21:11

1 Answers1

2

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.

Curtis
  • 101,612
  • 66
  • 270
  • 352