I have a page with several user controls that use Ajax. When I try to do a response.redirect from this page, Ajax traps the call and does not allow the redirect.
How can I do a response.redirect from an Ajax page?
Thanks…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How much control over the AJAX actions do you have in the user controls? If you can modify the client side, the easiest thing to do is to return a JSON object that you can parse and send the URL that you want to redirect to as data. Once you get the data on the client, simply set window.location.href to the url.
With jQuery it would look something like: