“求助:dropdownlist控件查询问题”
protected void Button6_Click(object sender, EventArgs e){
if (DropDownList1.SelectedItem.Text.Trim() == "姓名")
{
string name = TextBox1.Text;
DataList1.DataSource = me.getallmembersbyname(name);
DataList1.DataBind();
TextBox1.Text = " ";
}
if (DropDownList1.SelectedItem.Text.Trim() == "身份证号")
{
string id = TextBox1.Text;
DataList1.DataSource = me.getallmembers(id);
DataList1.DataBind();
TextBox1.Text = " ";
}
}
为什么只能执行一次查询?查了姓名的身份证号的就查不来 DropDownList 控件 --------------------编程问答-------------------- 调试 查看DropDownList1.SelectedItem.Text.Trim() 的属性值
补充:.NET技术 , ASP.NET