asp.net“文本框失去了对asp.net的关注" [英] asp.net "textbox lost focus in asp.net"

查看:76
本文介绍了asp.net“文本框失去了对asp.net的关注"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


实际上,我使用文本框lostfocus事件在vb.net上的银行业中完成了一个项目.现在我需要在asp.net中编写.但是我是asp.net的新手,所以我不怎么在asp.net中做它,在asp.net文本框中不存在Lostfocus事件……除了编写脚本我该怎么做才能编写代码.
谢谢
roopagovindaiah

Hi
actually i was done a project in vb.net on banking using textbox lostfocus event. now i need to write in asp.net. but i am new to asp.net so i dont no how to do it in asp.net ,in asp.net textbox lostfocus event is not there... other than scripting what can i do for coding.
thankyou
roopagovindaiah

推荐答案

如果要进行一些客户端处理,请使用onblur事件并向其附加JavaScript处理程序.
对于服务器端处理,您需要处理TextBox的TextChanged事件.请记住要为TextBox启用AutoPostBack .

希望这对您有帮助!
If you want to do some client side processing, use onblur event and attach a JavaScript handler to it.
For server side processing, you need to handle TextBox''s TextChanged event. Do remember to enable AutoPostBack for the TextBox.

Hope this helps!


@ankur ....我不是仅收到onblur事件....我使用的是2005年框架工作,这是此问题的原因?????? ??????

谢谢你
roopagovindaiah
@ankur.... i am not getting onblur event only .... i am using 2005 frame work is tht reason for this problem ????????????

thank you
roopagovindaiah


解决方案:)
在加载页面上使用此代码...."... textbox1.attributes(" onblur)=" javascript;"..."
并启用自动回发属性.
solution :)
on load page use this code...."...textbox1.attributes("onblur")="javascript;"..."
and enable auto postback property.


这篇关于asp.net“文本框失去了对asp.net的关注"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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