mouseOver effect

G

Guest

Hi there,
I have an ASP.NET page with 4 imagebuttons on the left and 1 big image in
the middle.. i need to get a mouseover effect which changes the big middle
picture everytime the mouse rolls over one of the 4 imagebuttons ( 4
different pics)..

how can i do this???
 
G

Gopal \(FMS, Inc.\)

Imagebuttons that are not part of an item template render an input tag with
id as the name of the imagebutton. You may be able to use this fact to call
client side JavaScript code If ImageButton1 is originally pointing to
FMSLogo.gif, the following code is similar to what you need.

ImageButton1.Attributes.Add("onmouseover",
"javascript:document.getElementById('ImageButton1').src='Images/FMSLogo2.gif
';")
ImageButton1.Attributes.Add("onmouseout",
"javascript:document.getElementById('ImageButton1').src='Images/FMSLogo.gif'
;")

Hope this helps.
--
Gopal Rangaswamy
Microsoft Certified Solutions Developer
FMS, Inc.
<http://www.fmsinc.com/consulting>
<http://www.fmsinc.com/dotnet/SourceBook/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top