Link to home
Create AccountLog in
Avatar of cmerlo1
cmerlo1

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of cmerlo1
cmerlo1

ASKER

Perfect!