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
 

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

Back
Top