the scenario is like so :
say i have a table , html table , the table has few <td>
Controls each has a set of controls,
that is related to that specific <td>
, but not necessarily enclosed within the <td>
scope.
for example :
<asp:Label ID="Lbl_TlTp1" runat="server">
<table>
<tr>
<td ID="TD_1" runat="server">
<asp:Label ID="LBL_1" runat="server" />
</td>
<td>
<asp:TextBox ID="TBX_1" runat="server" />
</td>
</tr>
</table>
now i want to be able to address tips Label Lbl_TlTp1
, DataLabel LBL_1
And the TextBox TBX_1
as A set or a collection, to be very flexible (allowing Enumeration etc'..)
is it by making it(that "set" ) as a class or object that encapsulates those control items... each as a member ?
i would like to later be able to manipulate the "set" as one entity
setOfControls Sct1 = new setOfControls()
public void ActAppon(setOfControls section)
{
execProcedure1(section);
foreach(control ctr in section)
{
doTheThing(ctr);
}
}
...etc'
what is the approach to achieve this solution ?