Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends!


i want to set focus on my textbox control i used focus() method but it is not working.

set focus on id field
ex.

database id = 5
uer enter on id textbox = 5;

5 is already exist so user can again set focus on idtextbox. and not showing error about primary key and foreign key
Posted
Comments
ZurdoDev 5-Dec-13 7:56am    
Search on how to do it through javascript. ASP.Net does not work at all like Windows Forms.
BillWoodruff 5-Dec-13 7:57am    
You question is confusing: is this Windows Forms or ASP.NET ?

Please show the code where you attempt to set Focus on the TextBox, and describe what's not working.
piyush_singh 5-Dec-13 8:05am    
You can easily achieve it using javascript.
Adam Zgagacz 5-Dec-13 9:33am    
Please give as some code. BTW if this is C# and WinForms Focus() should work.

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