• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1274
  • Last Modified:

ASP.net Enlarge Grid View ImageButton on MouseOver

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
cmerlo1
Asked:
cmerlo1
1 Solution
 
ZvonkoSystems architectCommented:
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
 
cmerlo1Author Commented:
Perfect!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now