Currently, I'm in need of displaying a Success Message
and upon clicking OK
, it should automatically Redirect
me to another Page
. While everything was working perfectly, the introduction of an UpdatePanel
seems to have caused the Alert
not to show up.
Here is my code:
ClientScript.RegisterStartupScript(typeof(Page), "Create Time Table", "<script language='JavaScript'>alert('Time Table Created Successfully.'); window.location.href = 'create.aspx';</script>");
I have also attempted the following variations:
ClientScript.RegisterStartupScript(typeof(Page), "Create Time Table", "<script language='JavaScript'>alert('Time Table Created Successfully.'); window.location.href = 'create.aspx';</script>", true);
ClientScript.RegisterStartupScript(typeof(Page), "Create Time Table", "<script language='JavaScript'>alert('Time Table Created Successfully.'); window.location.href = 'create.aspx';</script>", false);
Unfortunately, these solutions did not work as expected.