Tooltip containing an image on a image column of a gridview
Posted on 2011-10-28
I am new with .net and I have a question about tooltips. I have a gridview containing products of a catalogue in an asp.net 2008 page. I have one image column (second column so index=1) in it that contains a camera picture when a picture of the product is available. On mouse over this column I wanna pop a tooltip that shows the actual image of the product.
In the rowdatabound event of my gridview, I have the following that shows the camera picture :
If e.Row.RowType = DataControlRowType.DataRow Then
Dim pathphoto As String
pathphoto = "./picturesproducts/" & e.Row.Cells(0).Text & ".jpg"
If System.IO.File.Exists("c:\temp\picturesproducts\" & e.Row.Cells(0).Text & ".jpg") Then
' one picture of the product is available show the camera
e.Row.Cells(1).Text = "<img src='./img/tub_pic.jpg'/>"
e.Row.Cells(1).ToolTip = I want to put an image of the product into that tooltip
Thank you all