Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: 2 ImageButtons: Rollover


Message #1 by "Chris Policastro" <chris.policastro@u...> on Mon, 17 Jun 2002 19:27:15
I have two <ASP:ImageButtons>. When I move my mouse over one, I would like 
to change the image of both.

Here is the code I use for a single ImageButton:

<asp:ImageButton id="ImageButton1" runat="server" ImageUrl="Images\1.gif"
OnMouseOver="src='Images/2.gif';"
OnMouseOut="src='Images/1.gif';">
</asp:ImageButton>

Here is the code I am "TRYING TO USE" for multiple ImageButtons:

<asp:ImageButton id="ImageButton1" runat="server" ImageUrl="Images\1.gif"
OnMouseOver="src='Images/2.gif';ImageButton2.src='Images/1.gif';"
OnMouseOut="src='Images/1.gif';ImageButton2.src='Images/2.gif';">
</asp:ImageButton>

Can anyone tell me why this doesn't work, and what will work?

Thanks!

  Return to Index