Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I have many textboxes in my webform and i want to detect the id of the textbox which has the focus, whether by clicking or by using tab key.
Posted
Updated 6-Oct-10 1:54am
v4
Comments
Hiren solanki 6-Oct-10 1:42am    
removed excess white spaces.
Hiren solanki 6-Oct-10 7:54am    
subject.tolowercase();

1 solution

put the onFocus attribute inside the TextBox and run Js when onFocus triggeres.

i.e.

TempTextBox.Attributes.Add("onFocus", "DoFocus(this);");


Now the put the Js for DoFocus

function DoFocus(this)
{

}


Now object this is your TextBox object now play with it as you want.

Please vote and Accept Answer if it Helped.
 
Share this answer
 

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