【发布时间】:2014-03-28 03:52:40
【问题描述】:
DropDownList 的SelectedIndexChanged() 事件填充页面上的ListBox。显然,这会将页面发布回服务器。有没有办法在没有完整回发的情况下实现它?
protected void ddlTablo_SelectedIndexChanged(object sender, EventArgs e)
{
List<string> list = new List<string>();
ListBox1.Items.Clear();
var columnNames= from t in typeof(Person).GetProperties() select t.Name;
foreach (var item in columnNames)
{
list.Add(item);
}
ListBox1.DataSource = list;
ListBox.DataBind();
}
【问题讨论】:
标签: asp.net drop-down-menu postback