473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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?

Jul 22 '05 #1
1 1854
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
microsoft.public.dotnet.framework.aspnet.

HTH,
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eric Osman | last post by:
Hi, I'm looking for a javascript function that will convert input such as this: <CLUB Code=" into this: &lt;CLUB Code=&quot;
4
by: barney | last post by:
Hello, I' m using .NET System.Xml.XmlDOcument. When I do the following: XmlDocument xml = new XmlDocument(); xml.Load("blah"); .... xml.Save("blub"); I've got the problem that the following...
6
by: Paul Turley | last post by:
Does anyone have some sample script to "press" a button or image button when the user presses the Enter key? I see this behavior on a lot of web pages but I'm not finding any samples. Thx --...
5
by: martin | last post by:
Hi, I would be extremly grateful for some help on producing an xml fragemt. The fragment that I wish to produce should look like this <Addresses> <Address>&qout;Somebody's Name&quot;...
7
by: Venus | last post by:
Hello, I am trying to generate a dynamic form at runtime and would like to do it using "<asp: ..." form elements as follows Build up the string that is placed somewhere in the HTML code the...
3
by: DC Gringo | last post by:
I have an image control (that pulls an image off an ESRI map server): <ASP:IMAGE ID="imgZonedCountry" RUNAT="server"></ASP:IMAGE> In the code behind I am setting the ImageURL to a String value...
7
by: DC Gringo | last post by:
I am having a bear of a time with setting a URL query string as a text value in a dropdownlist and Server.URLEncode does not seem to do its job. theFullLink = theLinkPrefix &...
14
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only...
9
by: Alexandra | last post by:
Not sure why none of these permutations are working. I appreciate a second set of eyes! .... <form id="form1" name="form1" > .... <input name="Submit1" type="submit" tabindex="10"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.