My code is enclosed in a try/catch block with a redirect to another page, but I'm encountering a problem. When a user clicks on a submit button, instead of redirecting to the intended page, the page simply refreshes and stays on the same page. This issue occurs sporadically, sometimes requiring multiple clicks before the redirect is successful and the user is taken to the SUCCESS Page. Any insights into why this might be happening would be greatly appreciated. Thank you.
try
{
...
Response.Redirect("SOME PAGE SUCCESS", false);
}
catch (Exception ex)
{
Response.Redirect("SOME PAGE FAIL");
}
A JavaScript script invokes a doPostBack to send data to the server side.
setTimeout('__doPostBack(\'' + el.name + '\',\'' + args + lia + '\')', 500);