Well this won't be done by just a Server-Side code. You'll need a client side language too.
Lets take the example of jQuery. You can show the image's name using this code:
$('img').hover(function () {
alert($(this).attr('src'));
}
Now this code would take the source of the image and then show it to the user on the hover event. That is what you want. But using the serverside you can either show it on the page load, but if you want to show that on the Hover, you can do that using either jQuery or if you want to show the name in the title attribute then you can simply write it there. For example:
<img src="link/to/file.png" title="file.png" alt="photo" />
This way, the image's name will be shown in a title element when the user would hover over to the image.