dropdownlist SelectedIndexChanged断点未触发

时间:2011-07-21 09:18:51

标签: asp.net drop-down-menu asp.net-4.0

我的asp.net页面上的dropdownlist控件上有一个断点。但是当我从ListBox中选择一个项目时它不会被激活。我在这里错过了什么?

onselectedindexchanged="ddlProjectSearchID_SelectedIndexChanged"  

protected void ddlProjectSearchID_SelectedIndexChanged(object sender, EventArgs e)
{
    ClientScript.RegisterClientScriptBlock(typeof(string), "key", string.Format("alert('{0}');", DateTime.Now.Day), true);
}

1 个答案:

答案 0 :(得分:3)

在DropDown上设置AutoPostBack="true"