How do I get the ID of the textbox that has focus on an ASP.NET WebPage

  • Thread starter Thread starter dougmcmurtry
  • Start date Start date
D

dougmcmurtry

I have a web app that is going on a touch screen computer with no
keyboard, so I have to allow them to enter numeric data into text
fields through a UserControl that I built. All I need to find is which
textbox control on the page has focus so I know where to put the
input. Any ideas? Thanks all......
 
Determine the type of each object raising each event on the form. If its a
TextBox object get the ID.

<%= Clinton Gallagher
 
Great, thanks so much! I'll give that a try, but there might be a
stumbling point since I am using AJAX. Any suggestions?
 
AJAX is all client-side code and has nothing to do with what you need to do
with server-side code. What are you working on, a digital signage project?


<%= Clinton Gallagher
 
I erred. Yes, in fact your client-side code will be written in JavaScript to
get the focus of the control on the client.

<%= Clinton Gallagher
 
Back
Top