自动回发属性的光标消失为true。 [英] Cursor disappear for Auto postback property to true.

查看:82
本文介绍了自动回发属性的光标消失为true。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的登录页面中,有两个用于ID,密码和公司下拉列表的文本框。当用户输入id然后公司下拉列表加载他所属的公司。为此,ID文本框autopostback属性为true。问题是当用户输入id并单击以输入密码时,光标不会保留在密码文本框中。因此用户必须单击第二次键入密码。请给我一个正确的解决方案来摆脱这个问题。

In my Login page there are twotextbox for ID, Password and a dropdown for Company. when a user put id then company dropdown loaded with which company he belongs to. For this the ID textbox autopostback property is true. The problem is that when user put id and click to put password then cursor does not remain in password textbox. So user have to click second time to type password. Please give me a proper solution to get rid of this problem.

推荐答案

没问题,因为当你离开Id文本框并将Cursor放在密码字段中时然后回发。这意味着页面再次完全加载。

所以,所有控件都被重置。

这就是你需要点击第二次输入密码值的原因。



您可以使用javascript / jquery / Ajax等解决它



以上解决方案之一..

见这个答案..

http://stackoverflow.com/questions/7322906/set-focus-to-any-control-after-postback [ ^ ]
no problem in that, because when you leaving the Id text box and placing the Cursor in password field then Post back occurring.that means the page is fully loading again.
so, all controls are reset.
that's why you need to click 2nd time for the password value.

you can resolve it using javascript/jquery/Ajax etc

one of the above solution..
See this Answer..
http://stackoverflow.com/questions/7322906/set-focus-to-any-control-after-postback[^]


这篇关于自动回发属性的光标消失为true。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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