ASP.NET Label Events Help

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

Mike Ryan

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

Members online

Forum statistics

Threads
474,268
Messages
2,571,096
Members
48,773
Latest member
Kaybee

Latest Threads

Top