How can I retrieve which control had focus

J

julien

Hi,
after the OnCLick event, when I am in the function that deal with the
event, I want to retrieve the control that had the focus on the page?
How can I do this please?
Thanks in advance.
JULIEN
 
E

Eliyahu Goldin

Do you mean a server-side event handler? Then it gets a parameter "sender"
which is the pointer on the control that caused the event.

Eliyahu
 
J

julien

Actually, when I am on my page and that I click the "ENTER" key and
that I have several buttons with onclick event, I cannot know from the
sender parameter which control (textbox or dropdownlist for instance)
had the "focus". This is what I need to know. Thanks
 
E

Eliyahu Goldin

You mean when you hit "ENTER" key on the keyboard? "Click" refers to mouse
actions and for them focus moves to the control you click.

Eliyahu
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top