I\'m having trouble with displaying image from db. I think that method for saving image is working, because I see in DB that varbinary fields have some value, and that image
My guess is that you have a routing issue. If the url /product/getimage/18
should work for your action you need to have a route that looks something like this:
routes.MapRoute("ProductImage",
"product/getimage/{productID}",
new { controller = "Product", action = "GetImage", productID = "" }
);
To confirm this you should use firebug and check the "net" tab (or set a breakpoint in your action and see if it gets hit when you load the page).
I would also recommend using the build in helpers to generate your urls (then this kind of problem will never happen). Instead of src='/product/getimage/<%= Html.Encode(product.ID) %>'
you can write src='<%=Url.Action("GetImage", "Product", new { productID = product.ID })%>'