How can I retrieve which control had focus

  • Thread starter Thread starter julien
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top