title: javascript written in code behind does not work after timer runs out when it has document.ready jquery method in client side
body: <p>i have timer running in code behind, once the timer runs out it must execute a method, javascript alert should appear and then redirect to another page.</p>
  
  <p>Used this code in method: </p>
  
  <pre><code>Page.ClientScript.RegisterStartupScript(this.GetType(),  "Success", "&lt;script type='text/javascript'&gt;alert('All tests are finished. Thank you for your time.');window.location='Profile.aspx';&lt;/script&gt;'");
  </code></pre>
  
  <p>It works fine when Finish button is clicked but when timer runs out this code does not work and it will be on same page. I can use Response.Redirect but I also need a alert before page redirecting. I have $(document).ready() in client side page and it is executing the client page all over again after the code behind page is executed and this is the reason it is ignoring the javascript code of code behind and hence it is staying in same page without even a alert.</p>
  
  <p>is there anyway to not execute client side page after code behind page is executed? or some otherway to leave the page with just alert and redirecting the page</p>