I have an alert message and followed by a Response.Redirect block in Page_Init
The Response.Redirect works and redirects to a spectic page. But the alert msg is not showing.
I need the user to click the OK button in the alert msg after that only the page should rediret..
Please help.
Sample code:
ScriptManager.RegisterCleintScriptBlock(this,this.GetType(),"alert('Success')",true); Response.Redirect("index.aspx",false);
It will never work because the context is lost. The
alert()should be done inindex.aspx.cs.Here is the possible implementation:
And in index.aspx.cs
Page_Load: