views:

26

answers:

1

i have a navigation bar made up of ImageButtons that have their image swapped out on mouse over and back on mouse out. i used this code in the Page_Load handler to do this:

ImageButton1.Attributes.Add("OnMouseOver", "this.src='mouseover.gif'")
ImageButton1.Attributes.Add("OnMouseOut", "this.src='mouseout.gif'")

what i'm trying to do now is get the mouseover image to load when you click the button and are taken to the page. i tried this but it doesn't work:

ImageButton1.Attributes.Add("OnClick", "this.src='mouseover.gif'")

does anyone know how i can get this to work? thanks.

A: 

Try using OnClientClick

aprescott
that didn't work for me.
400_the_cat
when you use OnClientClick, what does the generated HTML look like?
dave thieben