只有在第二次点击提交数据库信息 [英] submitting database information only after second click

查看:131
本文介绍了只有在第二次点击提交数据库信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好
我有信息一个相当奇怪的次数,我想插入到数据库中,当我点击一个按钮控制,第二次才提交。我禁用按钮的信息已经被插入到数据库的访问后开始,因此我清楚的信息只在我的提交按钮的第二次点击提交。该事件仅触发第二次。
我没有注释掉的部分全部code如我包括在页面上自定义验证,但它不会有所作为。

Good morning I have a rather strange occurance in that information that I want to insert into a database is only submitted when I click a button control the second time. I disable the button after the info has been inserted into the access database and it is thus clear to me that the info is only submitted on the second click of my submit button. The event only fires the second time. I did comment out all the code in sections such as a custom validator that I included on the page but it does not make a difference.

我存储一些数据Session变量时,页面加载提交到数据库中,并认为这可能是问题,而不是我在文本框显示。
拆除会话变量并添加信息的文本框手工也不会有所作为。

I stored some data into Session variables which I display in the textboxes when the page is loaded to submit into the database and thought that this might be the problem and is not. Removing the session variables and adding the info to the textbox manually also does not make a difference.

有可能的见解,为什么发生这种情况,我怎么克服这一点。

Is there perhaps insight as to why this is happening and how I could overcome this.

亲切的问候
阿里安

Kind regards Arian

推荐答案

如果您在Visual Studio中开发只需添加一个断点到按钮点击事件,看看确定它是否正在提交或没有,你会发现你已经迷上错了地方你的数据库访问权限。

If you develop in Visual Studio just add a breakpoint onto the button click event and see for sure whether it is being submitted or not, you may find you've hooked your DB access in the wrong place.

另外,检查你的浏览器的JavaScript错误因为这些可能导致流量是你所期望的。

Also, check your browser for javascript errors as those may cause flow to be different to what you expect

这篇关于只有在第二次点击提交数据库信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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