Asp.net下拉工具提示仅工作第一次选择 [英] Asp.net dropdown tooltip Working only first time select
本文介绍了Asp.net下拉工具提示仅工作第一次选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的代码,这段代码只有一次,我的选择错误我试图选择另一个工具提示不工作。如何解决这个错误。任何人都可以帮助我。
This is my code this code only worikg for at a one time,my selection wrong i try to select another one tooltip not working.how to fix this eror .any one can help me.
//tooltip
int ItemCount = dropdownConsignee.Items.Count;
for (int i = 0; i < ItemCount; i++)
{
dropdownConsignee.Items[i].Attributes.Add("Title", Ds.Tables[0].Rows[i]["Address"].ToString());
}
dropdownConsignee.Items.Insert(0, new ListItem("Select", "Address"));
dropdownConsignee.SelectedItem.Selected = false;
dropdownConsignee.Items.FindByText("Select").Selected = true;
Tnahk你
Tnahk you
推荐答案
每当您更新下拉列表时,请清除以前的绑定数据。
并使用它来选择选择值
Whenever you updating the dropdownlist clear the previously bind data.
and use this for selecting the select value
dropdownConsignee.SelectedIndex=0;
这篇关于Asp.net下拉工具提示仅工作第一次选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文