Saturday, March 24, 2012

Trigger on onmouseover

I have an updatepanel with a button and a panel inside. If I hold the mouse over the button I want to update the panel with some information from a database. I can't find out how to trigger on a onmouseover-event, is this possible?

Thanks for your help!

You're probably going to be unhappy with the performance, doing it that way, but you can just a an onmouseover attribute to the button. In the onmouseover handler, you could either call button.click() oruse __doPostBack() to trigger the partial postback.


It seem to work. Thank you for the tip!

I also want my updatepanel to fade in when I hold the mouse over a button and to fadeout on mouseout, is this possible to do with the animations in AjaxControlToolkit?

Thanks for your help!


Yes, the Animations in the Toolkit can do that. Personally, I find jQuery a lot easier to use for animation though. You might want to check that out also.

So the toolkit can do it? I have been trying to do this all day but can't find out how! Do you have an example on how to do it? It would be great!


Thanks again for your help!


Take a look at the Animation documentation: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Animation/Animation.aspx

You can see the basic syntax of setting up the onmouseover and onmouseout animations in the properties section of that page, at the bottom.

No comments:

Post a Comment