?
Solved

ASP.net Enlarge Grid View ImageButton on MouseOver

Posted on 2007-10-06
2
Medium Priority
?
1,263 Views
Last Modified: 2008-01-09
I have a datagrid that contains a template field with the following image button:

<asp:ImageButton ID="ImageButton6" runat="server" CommandName="Select" ImageUrl='<%# Eval("PicURL1") %>' ImageAlign="AbsMiddle" BorderColor="Black" BorderStyle="Double" BorderWidth="3px" Width="50px" />

I would like a simple way to double the image size when a user moves the mouse pointer over the image button.  I have tried adding: onmouseover="this.width=100;" but this does not work (I didn't think it would be that simple) and VWD 2008 tells me that mouseover isn't an attribute of the image.  I try adding the attribute via VBScript on the pageload event, but the ImageButton6 ID isn't recognized and the page errors out...is there a simple javascript or vbscript code snippet that will accomplish this?
0
Comment
Question by:cmerlo1
2 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 1000 total points
ID: 20028216
Check this:


<asp:ImageButton ID="ImageButton6" runat="server" CommandName="Select" ImageUrl='<%# Eval("PicURL1") %>' ImageAlign="AbsMiddle" BorderColor="Black" BorderStyle="Double" BorderWidth="3px" Width="50px"  onMouseOver="this.style.width=100;" onMouseOut="this.style.width=50" />




0
 

Author Comment

by:cmerlo1
ID: 20028253
Perfect!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question