ddlBanAcc.Items.Insert(0, new ListItem("", ""));
string s = ddlBanAcc.SelectedValue;
string[] words = s.Split('|');
if (ddlBanAcc.SelectedIndex > 1)
{
query += "'and DtaLineAccountToDebit='" + words[0] + "'";
}
在 ddlBankAcc (下拉列表选择)上,我正在填充更新面板中的 Datagrid
但是代码未执行,并且此语句未选择任何值ddlBanAcc.SelectedValue;
编辑:HTML代码
<td align="left" valign="top">
</td>
<td>
Bank Account:
</td>
<td>
<asp:DropDownList runat="server" ID="ddlBanAcc" Width="160px" TaEvalex="3">
</asp:DropDownList>
</td>
编辑:我如何在 ddlBanAcc 中添加数据
DataTable dtbankaccount = oDBAccess.getDataTable("SELECT BkiAccountNb + ' | ' + BkiCurrency+ ' | ' +BkiAccountNb AS CONCATE From VwCieBankAcc");
ddlBanAcc.DataTextField = "CONCATE";
ddlBanAcc.DataSource = dtbankaccount;
ddlBanAcc.DataBind();