为什么button_click事件提升2次? [英] why button_click event raising 2 times?
问题描述
大家好,在我的C#.net 3.5 windows应用程序中,我在我的button_Click事件中有一个insert语句。
但是这会引发2次,所以2行有相同的数据插入而不是1。 br>我在达到最后一个语句后检查了debugmode它再次转移到第一个语句。
为什么会发生这种情况?
请给出一些解决方案
感谢提前
- Naren
:-O
Narendra Reddy Vajrala写道:请给出一些解决方案
它非常简单...在新项目中添加另一个按钮,放置断点并检查是否调用了两次。如果你的窗户出现问题,或者你的鼠标正在死亡。搜索结果
Hi all,
in my C#.net 3.5 windows application, i have a insert statement in my button_Click event.
but this is raising 2 times, so 2 rows with same data inserting instead of 1.
i checked in debugmode after reaching last statement it is moving to first statement again.
why this is happening?
Please give some solution
Thanks in Advance
--Naren
:-O
Narendra Reddy Vajrala wrote:Please give some solution
Its quite simple...add another button in a new project, put breakpoint and check is it calling twice or not. If it is then something wrong with your windows or your mouse is dying.
这篇关于为什么button_click事件提升2次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!