I need some help or information with showing the image int the <img> tag when the src attribute is the binary array (ASP.NET MVC 3):
https://stackoverflow.com/a/2644598/106616
this I the solution I use. (the purpose is, i don’t want to show users the physical image path)
Ok, then I want to use the FancyBox plugin to show that image:
<link href="@Url.Content("~/Content/jquery.fancybox-1.3.4.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.fancybox-1.3.4.js")" type="text/javascript"></script>
<a id="book-cover-hl" href="@path">
<img alt='' class='book-cover-details' src="@path" />
</a>
$(function () {
$("a#book-cover-hl").fancybox({
'overlayShow': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic'
});
});
But, I’ve noticed if I put the
@pathvariable in the<a [...]the plugin doesn’t work properly – if I click on the
href="@path">
image, only the loading animation shows, but not my image. Does anyone
know how to fix it? Or maybe there is another idea ? Let me hear it
from You about that.
According to that answer, it works: