在更新面板上使用Response.Redirect时如何防止回发 [英] How to Prevent Postback while using Response.Redirect with update panel

查看:79
本文介绍了在更新面板上使用Response.Redirect时如何防止回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用Vs2005.问题是我需要基于树节点选择显示新页面.iam使用response.redirect导航到下一页.

我的所有控件都在更新面板中,但在调用response.redirect时刷新页面.我需要停止刷新页面.

可以共享一个代码,这有点紧急.

问候,
sajith



i am using Vs2005 .the problem is that i need to show new pages based on tree node selection.iam using response.redirect to navigate to next page.

my all controls r in update panel but while calling response.redirect the page refresh. i need to stop the page from refresh.

can some one share the code it is a bit urgent.

regards,
sajith

推荐答案

浏览到其他页面时,肯定会刷新页面.使用UpdatePanel无效. Ajax仅在希望避免回发同一页面时才有用,它不能用于阻止页面刷新,因为您正在加载完全不同的页面.
When you browse to a different page, there will definitely be a page refresh. Using an UpdatePanel has no effect. Ajax is useful only when you wish to avoid a postback of the same page, it cannot be used to prevent a page refresh, since you are loading a completely different page.


您好,

重定向页面时,意味着新页面必须在浏览器中加载.

如果您使用Jquery.load(),则可以避免在某些特定标签控件中加载新页面时刷新浏览器


最好的
Hi,

while you redirect page means the new page must load in browser.

If you use Jquery.load() you can avoid browser refreshing when new page loads in some particular tag control


All the Best


尝试一下

try this

var url = '<%=ResolveUrl("~/Information/NonprofitableAgency") %>/' + DisId + '/' + Location + '/0';
document.location.href = url;


这篇关于在更新面板上使用Response.Redirect时如何防止回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆