I am trying use server controls or web controls to simulate the following
behavior. I've an image wrapped w/in a link to create a rollover effect as
if both elements we're one graphic:
<a href="javascript:submit();"
onMouseOver="MM_swapImage('Image1221','','images/btn_green_on.gif',1)"
onMouseOut="MM_swapImgRestore()" id="A1" runat="server"> Next <img
src="images/btn_green.gif" alt="Next" name="Image1221" width="16" height="16"
border="0" align="absMiddle" id="Image1"></a>
The advantage of the above code is that when developing for multilingual
sites, i don't need to create a new graphic button for each language, but can
instead change the text "Next" to whatever language. Additionally, when
moving the mouse over the link, the link's CSS style changes the color, and
at the same time, the mouseover event changes the corresponding button's
image, making a rollover effect - the link/button combination appears to be
"one graphic".
I'm trying to simulate this using web controls so that i can wire-up the
controls to specific events via code-behind. i've tried...
<asp:LinkButton id="LinkButton1" runat="server">Next</asp:LinkButton>
<asp:ImageButton id="ImageButton1" runat="server"
onmouseover="this.src='images/btn_green_on.gif';"
onmouseout="this.src='images/btn_green.gif';"
ImageUrl="images/btn_green.gif"></asp:ImageButton>
....however, i cannot manage to make the LinkButton execute onmouseover
events so that the ImageButton looks like it's been "rolled over".
Is there any way to do this?