ASP.NET页面重定向 [英] ASP.NET Page Redirect

查看:100
本文介绍了ASP.NET页面重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我想刷新页面,但是当我使用

Response.Redirect("Signup.aspx");

浏览器问我类似的事情您要重新发送信息吗?"

如果我单击重新发送,那么无疑会重定向,而且还会触发页面刷新之前先前触发的事件.
所以主要的问题是我想重定向或刷新我的页面而不重新发送信息.我已经在互联网上进行搜索,并尝试了许多选项,例如javascript,SmartNavigation和类似的东西,但问题仍然存在.有人知道如何解决吗?

我想将浏览器重定向到同一页面,但是我希望打开该页面就像第一次加载该页面一样


关于

Hello,
I want to refresh my page but when i use

Response.Redirect("Signup.aspx");

The browser ask me a thing like that "Do you want to resend your information?"

If i click resend then this no doubt redirects, but also fires the events that were fired previously before page refresh.
So the main problem is that i want to redirect or refresh my page without resending the information. I''ve searched on internet and tried dozens of options like javascript, SmartNavigation and stuff like that but the problem still persists. Anyone know how to solve it?

I want to redirect my browser to the same page, but i want that page to be opened just like its loaded for the first time


Regards

推荐答案

尝试Server.transfer.这将从服务器端重新加载页面.

如果您确实需要使用response.redirect,那么可以使用一种真正的DIRTY DIRTY方式重定向到临时页面,然后在该临时页面的页面负载中重定向回原始页面. (我说不要这样做.这会导致服务器和客户端之间来回太多)
Try Server.transfer. this will load the page from server side afresh.

If you really need to use response.redirect then you could so a real DIRTY DIRTY way of redirecting to a temporary page and then in the page load of that temporary page redirect back to the original one. (i say don''t do it. this will cause too much back and forth between server and client)


希望您会从下面的链接中获得灵感
http://www.xtremevbtalk.com/showthread.php?t=296478 [ ^ ]


在ASP.NET中检测刷新或回发 [ ^ ]
Hope You will get idea from the link below
http://www.xtremevbtalk.com/showthread.php?t=296478[^]


Detecting Refresh or Postback in ASP.NET[^]


这篇关于ASP.NET页面重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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