如何在下拉列表中选择文本时禁用另一个下拉列表? [英] How to disable another dropdown list when text is select in a dropdownlist?
问题描述
由于select是供客户选择值,我希望第二个下拉列表无法点击
我尝试过:
DdlTerm.Enabled = false;
DdlTerm.Items.Clear();
if(DDlLoanType.Text!=选择)
{
>
string query = string.Format(选择LoanTerm,来自LoanRates的LoanRate,其中LoanType ='+ DDlLoanType.Text +');
BindDropDownList(DdlTerm,query,LoanTerm ,LoanRate,选择);
DdlTerm.Enabled = true;
}
其他
{
DdlTerm.Enabled = false;
DdlTerm.Items.Clear();
}
嗨朋友,
在设计集属性中Enabled =false。以下链接可为您提供帮助。
创建级联DropDownLists ASP.Net [ ^ ]
As select is for customers to select values, I want the second dropdown list to be unclickable
What I have tried:
DdlTerm.Enabled = false;
DdlTerm.Items.Clear();
if (DDlLoanType.Text != "Select")
{
string query = string.Format("select LoanTerm, LoanRate from LoanRates where LoanType = '" + DDlLoanType.Text + "'");
BindDropDownList(DdlTerm, query, "LoanTerm", "LoanRate", "Select");
DdlTerm.Enabled = true;
}
else
{
DdlTerm.Enabled = false;
DdlTerm.Items.Clear();
}
Hi friend,
In design set properties Enabled="false". Below link help to you.
Creating Cascading DropDownLists in ASP.Net[^]
这篇关于如何在下拉列表中选择文本时禁用另一个下拉列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!