Show images with mouse
I have an ASP.NET page where I display products in a Gridview control. When users hover over a product name, a window will pop up and show that the product image is in it (by getting the product ID and searching for the corresponding image for it.)
Is there an AJAX control or something like this?
a source to share
There are several ways to accomplish this, but I usually think of it as a "hint" on an element with an image tag that points to the aspx page that returns the image. Or image directly.
Here is an example of my first option
<img src="http://www.mysite.com/GenerateProductImage.aspx?productId=1" alt="My Product" />
To do this, you will need to create a GenerateProductImage.aspx page and set the response type for the image if it only returns an image.
Here is a CSS ToolTip daemon to help you get started with the styling part
a source to share
You have several options. You can use the jQuery tooltip plugin or you can try the Ajax Control HoverMenu Toolkit
a source to share
I made a website with a lot of small photos. And when you dulled over them, they appeared at the top of the page. I used this jQuery chunk:
$(document).ready(function () {
$(".picture").hover(function () {
var src = $(this).attr("src");
var max_size = 200;
$("#img").attr("src", src);
});
});
a source to share