473,734 Members | 2,824 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mouseover effect on asp:imagebutton - is it possible


I got task to make my application much more attractive :(
First of all I have to add hover (mouseover) effect to several buttons -
imagebuttons - I only know manner with Java Script - but it does not work
with ASPNET objects.

Any ideas?

Feb 20 '06 #1
2 4486
The mouseover event is a client - side Browser DOM event, and therefore by
definition, it must be done with client-side script.
You can "inject" this script into the page from the server side with
RegisterClientS criptBlock, etc. but it still needs to be javascript since
the event of the mouse hovering over a control is a browser event and has
nothing at all to do with the server.
Hope that helps.

Co-founder, Eggheadcafe.com developer portal:

"Dariusz Tomon" wrote:

I got task to make my application much more attractive :(
First of all I have to add hover (mouseover) effect to several buttons -
imagebuttons - I only know manner with Java Script - but it does not work
with ASPNET objects.

Any ideas?


Feb 20 '06 #2
I think you can use addattribute with the javascript code on the server
side. Peter's solution works too

Feb 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Darren Clark | last post by:
I need to be able to send through 2 peices of infomraiton in the commandArgument property of a image button... <asp:imagebutton CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+ JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>_<%# DataBinder.Eval(Container,"DataItem."+JR.Core.Data.JobseekerData.FLD_SEARCH_ PROFILE_ID ) %>' CommandName='ProfileMatch' id="match" onmouseover="this.src ='../Images/magnifyover.gif'"
by: JIM | last post by:
Hello, Does anyone knows how to set the visible property of an asp:Imagebutton to true with javascript I've the following declared : <asp:ImageButton Id="tstImage" runat="server" visible="False" />
by: Michael Evanchik | last post by:
The following tag works fine in internet explorer, but in mozilla the image is not sized and left at its actualy size. Anyone know why? I though asp.net works on any browswer. <asp:imagebutton id="Image1" Runat="server" onclick="enteraccount" height="90" width="120" ImageUrl="images/account.gif" />
by: ACaunter | last post by:
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??? -- AdamPC@hotmail.com
by: JIM | last post by:
Hello, I've an asp:Imagebutton on my form with the visible property set to false <asp:Imagebutton ID="tstImage" runat=Server visible=False> How can I set the visible propery to true using a javascript ? I tried something like document.GetElementById('ImgTest').visible='true'; but without succes ....
by: Alex D. | last post by:
Does any body knows how to link an asp:textbox to an asp:imagebutton, both inside a User Control in asp.net 2 beta 2? So when a user enter some text in the textbox and press the "Enter" key the corresponding button click event is launched? Tnx.
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif" runat="server"></asp:imagebutton></A> When the user sees these buttons, they will currently be on the savings.aspx?category=whatever page, and when they click another button to look at other categories, all the links I have around these buttons direct to their various categories.
by: Bendik Engebretsen | last post by:
I'm an ASP newbie and have just started experimenting with ASP.NET 2.0 using the VS.NET 2005 Beta. As a starting point I have used the 'Personal WEB site' starter kit. I am now trying to figure out how to make my image buttons come 'alive' with a mouseover effect. I am used to DHTML and using the mouseover event to change the bitmap. But what is the correct/best way to do this in ASP.NET ? Any experienced ASP.NET people who would care to...
by: Shapper | last post by:
Hello, I have 2 Asp:ImageButton in my .aspx file and I have the function "Run" in m .aspx.vb file. I need to run this function when one of the ImageButtons is pressed but I need to know which one was pressed. How can I do this? I was trying with commandname and oncommand properties of ASP:ImageButton but I was not able to make this work.
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.