protected void Button1_Click(object sender, EventArgs e) { try { { bl.grp_id = Convert.ToInt32(dwd_grp.SelectedValue.ToString()); bl.bank_nm = TextBox1.Text; bl.nick_nm = txt_nik_bnk.Text; bl.address1 = txt_ad1.Text; bl.address2 = txt_ad2.Text; bl.ac_no = txt_ac_no.Text; bl.ifsc_no = txt_ifcs.Text; bl.branch = txt_branch.Text; bl.bsr = txt_bsr.Text; bl.opening_balance = txt_balance.Text; bl.openinig_date = TextBox9.Text; bl.balance = txt_balance.Text; dl.insertbank(bl); ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Bank Created successfully'); window.location='company_master.aspx';", true); } } catch { } }