Here is the javascript function I am working with:
function redirect() {
window.setTimeout(function () { <% Response.Redirect("~/Pages/ExecrcisePlan.aspx"); %> }, 2000);
}
I tried calling this function from inside my asp.net page, but it seemed to execute on page load and redirect me without being called. Even after commenting out that line, the same issue persisted. I am aware that there are other javascript alternatives available, but I was curious why this method did not work and if there is a way to make it functional?