Home All Groups Group Topic Archive Search About
Author
2 Aug 2006 12:26 AM
Seema Multani
I want two labels in my asp page with image <-- and -->(i.e right and left
arrows).  and I want it's click events.  But I think in asp.net 2.0 in VS
2005 doesn't have click events for labels.  How can I do that.  Do I have to
use another control

Author
2 Aug 2006 5:14 AM
Nathan Sokalski
Visual Studio 2005 gives warnings about a lot of attributes that you are
allowed to use. When you include an attribute that VS 2005 says is not a
valid attribute, it will still output that attribute and value to the
generated page. If you are talking about the JavaScript onclick event,
simply add it the same way you normally would. If you wanted the server-side
click event, you would have to use a different control (probably the
LinkButton control). Hopefully this helps, Good Luck!
--
Nathan Sokalski
njsokal***@hotmail.com
http://www.nathansokalski.com/

Show quoteHide quote
"Seema Multani" <se***@hotmail.com> wrote in message
news:%239OpTpctGHA.560@TK2MSFTNGP05.phx.gbl...
>I want two labels in my asp page with image <-- and -->(i.e right and left
>arrows).  and I want it's click events.  But I think in asp.net 2.0 in VS
>2005 doesn't have click events for labels.  How can I do that.  Do I have
>to use another control
>
Author
2 Aug 2006 6:20 AM
Alessandro Zifiglio
Seema, a label control is used to display textual data. So, yes, you should
be using the imagebutton instead, which also supports the serverside click
events you are after :-)

Regards,
Alessandro Zifiglio
http://www.AsyncUI.net

Show quoteHide quote
"Seema Multani" <se***@hotmail.com> ha scritto nel messaggio
news:%239OpTpctGHA.560@TK2MSFTNGP05.phx.gbl...
>I want two labels in my asp page with image <-- and -->(i.e right and left
>arrows).  and I want it's click events.  But I think in asp.net 2.0 in VS
>2005 doesn't have click events for labels.  How can I do that.  Do I have
>to use another control
>