不能从与Ajax控件页面做的Response.Redirect [英] Cannot do response.redirect from page with Ajax controls
本文介绍了不能从与Ajax控件页面做的Response.Redirect的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个网页,包含许多用户控制,其中每一个使用Ajax。当我打开这个页面,在一定条件下,我希望做一个的Response.Redirect;但是的Response.Redirect语句被困阿贾克斯code和从未发生过。
I have a page that contains many user controls, each of which uses Ajax. When I load this page, under certain conditions, I want to do a response.redirect; however response.redirect statement is being trapped by Ajax code and never happens.
我如何做一个的Response.Redirect从包含Ajax控件的网页?
How do I do a response.redirect from a page that contains Ajax controls?
谢谢....
推荐答案
使用的Response.Redirect的相反,你可以使用JavaScript重定向。
Instead of using Response.Redirect, you can use Javascript to redirect.
window.location = "[url to redirect]";
这篇关于不能从与Ajax控件页面做的Response.Redirect的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文