ASP.NET Label Events Help

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Can anyone help me, I'm trying to catch the OnFocus and OnBlur events
for an asp.net label. I want to change the forecolor of the label text
when it is moused over, and then revert it back when the focus is taken
away. Thanks in advance for any help.
 
Hi Jim,

I usually use a TextBox in this situation since the Label control
renders as a SPAN (and thus lacks the events you're looking for). Just
change the TextBox's display attributes to give it a flat, label-like
appearance.

- Mike
 

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