Click here to Skip to main content
15,940,430 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Gridview contains an image,when on mouse hover the image should enlarge i.e Zoom

1 solution

You can try below mentioned JavaScript functions

function zoom(img){ = img.offsetWidth + 50 + "px";

function zoomOut(img){ = img.offsetWidth - 50 + "px";

you need to attach these functions on every image inside grid on two events onmouseover and onmouseout. You can use GridView1 RowDataBound event for this.Below is sample.

<img src=badge1blue.gif style="height"  onmouseover="zoom(this)" onmouseout="zoomOut(this)"/>
Share this answer
bandamsravya 30-May-13 5:45am    
Thank u :)
Mahesh Bailwal 30-May-13 6:10am    
Can you mark it solved if it worked for you.
bandamsravya 12-Jun-13 3:59am    
isplay multiple images in gridview based on sqlstatement and zoom on the selectedimage using mouseover


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900