Is it possible to show a jQuery Modal Dialog after a Page Redirect (Full Postback) ?
I have a page:
MyEditForm.aspx/EditId=0
In that page there is a form and a SAVE button, when I click the SAVE button I want to show a jQuery Modal Dialog giving the users some options but I want to show that dialog after I redirect the user to this page:
MyEditForm.aspx/EditId=500
It's the same page but with (EditId=500)
Here's my code:
StringBuilder sb = new StringBuilder();
sb.Append("jQuery(document).ready(function () {");
sb.Append(" jQuery(function() { ");
sb.Append(" jQuery('#MyDivID').dialog({");
sb.Append(" width: 350, autoOpen: true, modal: true);
sb.Append(" });");
sb.Append(" });");
sb.Append("});");
Page.ClientScript.RegisterStartupScript(this.GetType(), "MyDialogScript", sb.ToString(), true);
Response.Redirect("~/MyEditForm.aspx/EditId=" + NewRecordId, false);
If I don't use Response.Redirect the Dialog works fine but I won't be able to redirect the user to the page with the new ID, how can I solve this?