protected void Button1_Click(object sender, EventArgs e) { try { { bl.comoditiy = txt_comodity.Text; bl.tarifno = txt_tarifno.Text; dl.insert_tarif(bl); ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Tarif Number Created successfully'); window.location='tarrif.aspx';", true); grid(); } } catch (Exception) { throw; } }