protected void Button1_Click(object sender, EventArgs e) { try { bl.godown_nm = txt_nm.Text; dl.insertitegodawon(bl); ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Godown Created successfully'); window.location='godown.aspx';", true); } catch { } }