I have a button that uses
OnClientClick="document.forms[0].target = '_blank'; window.setTimeout(fixform, 500);"
to allow the OnClick event to Response.Redirect to a new window. "fixform" sets the target back to normal. This works great when everything goes according to plan. How do I stop it from opening a new window when an exception is thrown on the OnClick event? I've tried Thread.Sleep for 500ms for the form to fix itself, but it still opens the current page in a new window, with the exception.
OnClickmethod toWebMethod, returning url instead of redirecting to it.WebMethodfrom JavaScript viaOnClientClickevent, returning true/false to causeOnClickto fire only if the call succeeds, updating a hiddenfield value if it doesOnClickeventResponse.Redirects to hiddenfields value