Reputation: 20916
<a href="@Url.Action("ShowPicture", "Pictures", new { id = Model.Pictures[i].PictureId })" title="lala" rel="image_group">
<img src="@Url.Action("ShowPicture", "Pictures", new { id = Model.Pictures[i].PictureId })" width="200px" alt=""/>
</a>
when i open link theh i can see picture
http://www.shrani.si/f/1N/77/2nh6icYN/2.png
but if i use fancybox then i usee
http://www.shrani.si/f/1g/Ka/4FZT4Kf6/1.png
i am reading picture from database. How to us efancybox with mvc and pictures stored in database
Puicture controller:
public ActionResult ShowPicture(int id)
{
ShowPictureModel model = new PictureManager().GetShowPictureModel(id);
return File(model.Bytes, model.ContentType);
}
Upvotes: 0
Views: 1099
Reputation: 8769
Set content type when binding fancybox -
$("a[rel='image_group']").fancybox({type: "image"});
Upvotes: 3