I have an ASP.NET site and I'm using jGrowl to display notifications to the user. This works great when the user stays on the same page, but what if I'm redirecting the user.
Example, AddPerson.aspx is a page for adding a new person. After a person is added the user is redirect to People.aspx. I'd like to then display the notification 'Josh Smith has been added.'.
I currently have a function in my Master page executing the javascript:
public void DisplayNotification(string html, string header)
{
string text = "\"" + html + "\"";
string options = "{ header: '" + header + "', life: 6000 }";
string scriptJGrowl = "$.jGrowl(" + text + ", " + options + ");";
ScriptManager.RegisterStartupScript(Page, GetType(), Guid.NewGuid().ToString(), scriptJGrowl, true);
}
How can I call this after a Response.Redirect?