在asp.net回发操作后刷新页面 [英] Refresh the page after a postback action in asp.net

查看:132
本文介绍了在asp.net回发操作后刷新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的asp.net网格添加命令按钮。使用该按钮执行操作之后,我们刷新网格以反映新的数据。 (基本上这个动作重复了网格行)。

I have command button added in my asp.net grids. After performing an action using that button, we refresh the grid to reflect the new data. (basically this action duplicates the grid row).

现在,当用户在使用<大骨节病> F5 ,会显示一条警告消息,刷新页面(重新发送信息到服务器),如果我们选择重试,自动重复的动作。

Now when user refresh the page using F5, an alert message is displayed (to resend the information to server) if we select "retry", the action is repeated automatically.

我知道这是在asp.net中一个共同的问题,我们如何能够最好地处理呢?

I know this is a common problem in asp.net, how can we best handle this?

推荐答案

搜索POST后GET - <一个href=\"http://en.wikipedia.org/wiki/Post/Redirect/Get\">http://en.wikipedia.org/wiki/Post/Redirect/Get - 基本上,你在处理完您的活动后重定向到当前页面

Search for GET after POST - http://en.wikipedia.org/wiki/Post/Redirect/Get - basically, redirect to the current page after you're finished processing your event.

是这样的:

的Response.Redirect(Request.RawUrl)

这篇关于在asp.net回发操作后刷新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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