Jes Sie

Jes Sie

  • 744
  • 1.2k
  • 284.7k

failed to redirect to another page.

Apr 21 2017 3:58 AM
Can someone tell why the code below failed to redirect to the specied URL? The front-end of this code resides inside a tab container. Could it be the reason why it failed to redirect?
  1. string message = "New motor policy " + motorpolicy + " has been successfully saved.";  
  2.                     string script = "window.onload = function(){ alert('";  
  3.                     script += message;  
  4.                     script += "');";  
  5.                     script += "window.location = '";  
  6.                     script += ResolveUrl("../d-Underwriting/Motor/CheckCustomerMotorDataEntry.aspx");  
  7.                     script += "'; }";  
  8.   
  9.                     ClientScript.RegisterStartupScript(GetType(), "SuccessMessage", script, true);  
 

Answers (2)