By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,130 Members | 2,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,130 IT Pros & Developers. It's quick & easy.

How to: use SERVER controls to simulate HTML "link & button" rollo

P: n/a
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();"
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"

....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?

Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
charliewest wrote:
I am trying use server controls or web controls to simulate the

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest

Bob Barrows--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.