protected void btndeluser_Click(object sender, EventArgs e) { string user = DropDownList1.SelectedItem.ToString(); bool check = dba.deleteCustomer(user); if (check) { lbldelstat.Text = "Deleted Successfully!"; } else { lbldelstat.Text = "Delete Error!"; } DataTable dt1 = dba.getAllCustomers(); DropDownList1.DataSource = dt1; DropDownList1.DataValueField = "username"; DropDownList1.DataTextField = "username"; DropDownList1.DataBind(); }