Hello,
When you save details and redirect to same page then you just write code like this,
if (SaveDetails())
{
Session["sucmsg"] = "msg";
Response.Redirect("~/MypagePath.aspx");
}
You can use javascript at loadtime here with session. The secure way here is use session whenever you redirect to page. After at load time you just put code like this,
if (!IsPostBack)
{
if (Session["sucmsg"] != null)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "msg", "alert('Invoice has been submitted successfully');", true);
Session.Remove("sucmsg");
}
}
In this way you can show msg and also remove session. You can also pass any secure message to session. But make sure to remove session variable.
I will be back if any query.