protected void Button1_Click(object sender, EventArgs e) { try { bl.comp_nm = txt_comp_nm.Text; int cmp = Convert.ToInt32(dl.slelct_cust_id_bill(bl)); bl.cust_id = cmp; bl.brock_name = txt_brok_nm.Text; int brk = Convert.ToInt32(dl.slelct_brocker_cust(bl)); bl.brock_id = brk; bl.date = txt_inv_dt.Text; bl.per = TextBox4.Text; dl.inset_cust_brok(bl); ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Invoice Created successfully'); window.location='brocker_party.aspx';", true); } catch { } }