在刷新页面上是button_Click再次触发如何在asp.net中处理此问题 [英] on refresh page is button_Click fires again How to handle this problem in asp.net

查看:57
本文介绍了在刷新页面上是button_Click再次触发如何在asp.net中处理此问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在刷新页面上是button_Click再次触发.如何处理asp.net中的此问题

on refresh page is button_Click fires again How to handle this problem in asp.net

推荐答案

您好,
这样做的原因是您刷新了发送到服务器的最新信息. __doPostback中的按钮单击信息.这就是为什么您再次看到按钮触发事件的原因.
这是一篇有关如何检测回发刷新的文章:
检测页面刷新 [
Hi,
The reason for this is your refreshing the last information sent to the server. Which is the button click information in the __doPostback. This is why you are seeing the event of the button fire again.

Here is an article talking about how to detect a refresh over a postback:
Detecting Page Refresh[^]

I hope it will help,
Cheers


这篇关于在刷新页面上是button_Click再次触发如何在asp.net中处理此问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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