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);