dc

dc

  • NA
  • 663
  • 0

Two values for checkboxlist 2010

Oct 21 2011 12:31 PM
I am adding a checkbox list control to a new C# asp.net 2010 webform. I need to give the user to select all the companies and company number and company name. The default of the checkboxlist control is only allow you to select one value. In the sql server 2008 r2 database I am working with, the company name and company number come from two different database fields. Thus, I am wondering if you can tell me how to display the company name and company number in the checkboxlist control?

If this is not possible, can you tell me how to accomplish this goal a different way?

The following is my code:

<asp:TableRow ID="TableRowb" runat="server" Visible="true">
<asp:TableCell ID="TableCell4" runat="server" HorizontalAlign="left" >
<asp:CheckBoxList ID="ChkBoxLstPlan" runat="server" ColumnSpan="5" RepeatColumns="6" RepeatDirection="Horizontal"
HasHeader="true" CssClass="TextBoxStyle" HorizontalAlign="left">
</asp:CheckBoxList>
</asp:TableCell></asp:TableRow>

FillAttChkListBox(ChkBoxLstPlan, "Cnum", "Cnum", ExecuteQuery(strOrgSql), false);

Answers (1)