AsyncPostBackTrigger和PostBackTrigger有什么区别?
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();
}
Run Code Online (Sandbox Code Playgroud)