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

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......
 
C

clintonG

Determine the type of each object raising each event on the form. If its a
TextBox object get the ID.

<%= Clinton Gallagher
 
D

dougmcmurtry

Great, thanks so much! I'll give that a try, but there might be a
stumbling point since I am using AJAX. Any suggestions?
 
C

clintonG

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
 
C

clintonG

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top