--------------put this into head tag---------------
<script type="text/javascript">
function ok()
{
alert('Data submit successfully');
}
</script>
----------------------c# code-------------------
protected void btnsubmit_Click1(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("insert into tb_un_assets_info values('"+txt.Text+"')",con);
con.open();
cmd.ExecuteNonQuery();
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "ok();", true);
con.close();
}