Hiba
Hiba

Reputation: 251

How i can show images in image gallery in MVC 5?

I want to show images get from database in a base64 form and show in image gallery. Please someone suggest me the image gallery and how i can show image dynamically.The count of images maybe 2,5,6,.. . I don't know the count of images. how i can show images in a bootstrap or other plugin with MVC 5?

Upvotes: -2

Views: 443

Answers (1)

Ravi
Ravi

Reputation: 316

Use below code it will replicate images from Model. you can use Bootstrap Image Gallery

@foreach (var item in Model.Country)
    {
    <img src="data:image/jpg;base64,@(Convert.ToBase64String(item.Image))" alt="@item.CountryName" />
    }

Upvotes: 0

Related Questions