如何使用OnBlur事件检索数据库值? [英] How to retrieve Database values using OnBlur event?
本文介绍了如何使用OnBlur事件检索数据库值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用包含四个文本框的Gridview.当我提供userID时,在第一个文本框内,其他三个文本框应通过检索数据库值来填充.
当我在google上发现它时,我需要Textbox1的Onblur事件来执行这些操作.但是更多的结果表明我需要AJAX来做到这一点.我对这两种解决方案都比较新.
Hi All,
I''m using Gridview containing four textboxes. Inside the first textbox when i gave userID, other three textboxes should fill by retrieving database values.
When i google i found that, i need Onblur event of Textbox1 to do these. but some more results says that i need AJAX to do that. I''m newer to both these two solutions.
Can you please suggest me which one is better and How to do that??
推荐答案
您会很困惑.我建议您现在几乎可以肯定AJAX太复杂了,因此您应该忘记此任务.我假设没有人为您的代码付钱,所以请选择其他要做的事情来学习. AJAX是您需要做的,以通过数据库调用来响应onblur.听起来您应该先学习C#,然后学习ASP.NET,然后是javascript,然后再担心AJAX.
You''re very confused. I suggest that AJAX is almost certainly too complicated for you right now, so you should forget this task. I assume no-one is paying for your code, so choose something else to do to learn. AJAX is what you''d need to do, to respond to onblur with a database call. It sounds like you should learn C# first, then ASP.NET, then javascript, then worry about AJAX.
希望 ^ ]链接可能会对您有所帮助.
Hope this[^] link might help you.
这篇关于如何使用OnBlur事件检索数据库值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文