检查ASP.Net文本框值 [英] Checking an ASP.Net textbox value

查看:70
本文介绍了检查ASP.Net文本框值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在开发一个门户网站,我想在用户输入完成后再检查文本框的值并离开它。我想要像文本框离开事件。我想根据SQL Server数据库表中的值检查其值。我已经尝试使用文本更改事件,同时保持autopostback = true。但它仍然没有用。

任何人都可以帮助我................

Hi,

I am developing a web portal where I want to check a value of a textbox once the user finished typing in it and leaves it. I want something like textbox leave event. I want to check its value against the value in a SQL server database table. I have tried using the text changed event while keeping the autopostback = true. But still it is not working.
Can anyone help me please................

推荐答案

onblur事件你可以通过javascript调用,并使用webservice方法从数据库中检索值并仅在客户端进行比较。供参考点击这里

javascript如何使用webservice调用服务器端sql查询
onblur event u can called by javascript, and use webservice method to retrieve value from database and compare it at client side only. for reference click here
how javascript use to call server side sql queries using webservice


dude我认为你必须使用jquery ajax。

dude i think you have to use jquery ajax .


#txtID)。模糊( function (){

var text =
("#txtID").blur(function(){ var text=


这篇关于检查ASP.Net文本框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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