Hi instead of using alert use confirm it will ask your answer ok/cancel.
Just try this following code
ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "if(confirm('Have you saved everything')){window.open ('TestScriptPages.aspx');}", true);