does .NET 2.0 button support "onmouseover"?

R

Rob R. Ainscough

And is there any reference doc/material I can use to determine what events
the .NET 2.0 controls support?

thanks, Rob.
 
O

offwhite

These are a few good places to start...

http://msdn.microsoft.com/asp.net/
http://msdn.microsoft.com/asp.net/learning/learn/default.aspx
http://msdn.microsoft.com/asp.net/asprk/

As for what Javascript events the button supports, you will notice the
OnClientClick property for an ASP.NET Button. To attach the
onmouseover event you can use this code in your code-behind class.

Button1.Attributes.Add("onmouseover", "alert('Get off of me!');");

It will add that attribute to your button. And if you are really
interested in taking it a bit further, look into the Prototype
Javascript library.

Prototype Javascript Framework
http://prototype.conio.net/

With that you can use the bind() method to attach events to elements on
a web page. You will simply need to access the ClientID on the page to
attach the event to it.
 

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

No members online now.

Forum statistics

Threads
474,125
Messages
2,570,748
Members
47,301
Latest member
SusannaCgx

Latest Threads

Top