[英]Response.Redirect to same page without Page Refresh
I need to do a response.redirect to the same page. 我需要做一个response.redirect到同一页面。 How can I do this without the page "refreshing" or "flashing"?
没有页面“刷新”或“闪烁”怎么办? I can't use updatepanels because, this is a search website and I want the user to be able to use the browser's back button.
我无法使用updatepanels,因为这是一个搜索网站,并且我希望用户能够使用浏览器的后退按钮。 I have some search filters on the page, and each time a filter is clicked, I do a resposne.redirect (to the same page) with the appropriate query strings.
我在页面上有一些搜索过滤器,每次单击过滤器时,我都会使用适当的查询字符串来执行resposne.redirect(到同一页面)。
Thanks. 谢谢。
The only way you can do this without a "flicker" or "refresh" if you will is to do an AJAX call and update all your necessary fields. 如果不这样做,唯一的方法就是不进行“闪烁”或“刷新”操作就是进行AJAX调用并更新所有必要字段。 Otherwise
Response.Redirect()
will flicker your page. 否则
Response.Redirect()
将使您的页面闪烁。
Have a look at the EnableHistory property of the ScriptManager control. 看一下ScriptManager控件的EnableHistory属性。 Introduced in .NET 3.5 SP1, it allows the browser to maintain a history points for partial postbacks.
在.NET 3.5 SP1中引入,它允许浏览器维护部分回发的历史记录点。 This means the user can navigate through these history points through use of the forward/back buttons on their browser.
这意味着用户可以使用浏览器上的前进/后退按钮浏览这些历史点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.