private void BindBankAccount() { try { BABankAccount objBankAccount = new BABankAccount(); int BankAcId = 0; DataSet ds = objBankAccount.GetBankAccount(BankAcId); if (ds.Tables[0].Rows.Count > 0) { dropBankAccount.DataSource = ds.Tables[0]; dropBankAccount.DataTextField = "BankName"; dropBankAccount.DataValueField = "BankAcId"; dropBankAccount.DataBind(); dropBankAccount.Items.Insert(0, new ListItem("-- Please Select --", "0")); } else { dropBankAccount.DataSource = null; dropBankAccount.DataBind(); dropBankAccount.Items.Insert(0, new ListItem("-- Please Select --", "0")); } } catch (Exception ex) { lblMsg.Text = _BOUtility.ShowMessage("danger", "Danger", ex.Message); ExceptionLogging.SendExcepToDB(ex); } }