您的位置:首页 > 编程语言 > ASP

asp.net中DropDownList添加“请选择”提示

2012-02-13 06:45 411 查看
protected void Page_Load(object sender, EventArgs e)

{

if (!IsPostBack)

{

Bind();

}

this.drpDownDepartment.Items.Insert(0, new ListItem("请选择部门", "0"));

}



在调用的时候,需要做一个判断:



if (this.drpDownDepartment.SelectedItem.Text != "请选择部门......")

{

StaffBLL.UpdateStaffDepIDByID(this.lblNum.Text, departmentID);

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐