Home > ASP.Net, Javascript > Show image in Gridview on mouseover

Show image in Gridview on mouseover


try this example to show Image onmouseover where i save image name in database and upload image in

Car_Image folder in root of my website

<script type="text/javascript">   
function get_(div_)

function get_1(div_)


<asp:GridView ID="GridView1" runat="Server" AutoGenerateColumns="False">               
<asp:BoundField DataField="Id" HeaderText="Id" />                   
<asp:BoundField DataField="Name" HeaderText="Name" />                   
<asp:TemplateField HeaderText="Description">                       
<asp:Image ID="lnk" runat="server" Height="105px" ImageUrl='<%# Eval("Image", "~/Car_Image/{0}") %>'
                        Width="126px" onmouseover="get_(this);" onmouseout="get_1(this);"  />
<div id="lnk1" runat="server" style="display: none; position: absolute; background-color: #FEFFB3;width: 170px; border:gray">
<p><strong>Car Image</strong></p>                               
<img src='<%# Eval("Image", "~/Car_Image/{0}") %>' runat="Server" id="A" /></p>                           

Good Luck

Categories: ASP.Net, Javascript
  1. December 24, 2008 at 10:36 am

    . prada . dior. hermes . armani. dolche. gabbana. emporio. escada. cardin. ysl. puma. tj collection. no one

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: