Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 10-Dec-14 1:21am
Comments
Kornfeld Eliyahu Peter 10-Dec-14 7:14am    
This mostly means that your postback behaviour not well definded (I mean which control refreshes which control upon postback) - some may help you if you would post the code...
Sumon562 10-Dec-14 7:18am    
after typing the id company dropdownlist will be refreshed. then have to type password.
Actually first type id then company dropdownlist loaded but drodown item select after password typing.

1 solution

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[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900