I then use a dropDownList to display ALL the sub contractors from the sub contractor table.
If a sub contractor appears in the table I don't want them to be available in the drop down.
As the drop down allows the user to add a new sub contractor not one that is already added
Thank you
<table class="detailstable">
<asp:Repeater ID="repeaterShowSubContractorName" runat="server" >
<HeaderTemplate>
<tr>
<th>
<asp:Label ID="SubConName" Text="SubContractor" runat="server"></asp:Label>
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:Label ID="SubCon" Text='<%# Container.DataItem %>' runat="server"></asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
<tr>
<td>
<table class="ui-accordion">
<tr>
<td style="width: 102px">
Sub Contractor</td>
<td>
<asp:DropDownList ID="DropDownListSubContractors" runat="server"
DataSourceID="dropDownSubContractors" DataTextField="Company_Name"
DataValueField="Company_Name">
</asp:DropDownList>
<asp:SqlDataSource ID="dropDownSubContractors" runat="server"
ConnectionString="<%$ ConnectionStrings:ClarkesDevConnectionString %>"
SelectCommand="SELECT [Company Name] AS Company_Name FROM [Sub Contractor]">
</asp:SqlDataSource>
</td>
</tr>
</table>
<br />
<br />
</td>
</tr>
</table>

New Topic/Question
Reply


MultiQuote


|