本文介绍了如何在dropdownlist2上的dropdownlist1中显示所有数据selectindexchange的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我选择DropDownList4
代码是
When I select the DropDownList4
code is
protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
{
int a = 0;
DropDownList3.Items.Insert(0, new ListItem("Select Item", "Default value"));
DropDownList3.DataSource = ds1;
DropDownList3.DataValueField = "ItemName";
DropDownList3.DataBind();
}
DropDownList4的属性为-
Properties of DropDownList4 are -
AppendDataBoundItems=True
AutoPostBack=true
CausesValidation=False
DropDownList3的属性为-
Properties of DropDownList3 are -
AppendDataBoundItems=False
AutoPostBack=true
CausesValidation=False}
选择项目的文本不显示.
Select item text is not showing.
推荐答案
这篇关于如何在dropdownlist2上的dropdownlist1中显示所有数据selectindexchange的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!