asp.net中DropDownList添加“请选择”提示
来源:岁月联盟
时间:2012-02-13
{
if (!IsPostBack)
{
Bind();
}
this.drpDownDepartment.Items.Insert(0, new ListItem("请选择部门", "0"));
}
在调用的时候,需要做一个判断:
if (this.drpDownDepartment.SelectedItem.Text != "请选择部门......")
{
StaffBLL.UpdateStaffDepIDByID(this.lblNum.Text, departmentID);
}
摘自 徐越的专栏
下一篇:Gridview后台添加滑动效果