Answers for "How can I display image from database in asp.net mvc. I created image table and image path as varchar"

C#
0

How can I display image from database in asp.net mvc. I created image table and image path as varchar

<td><img src="<%= Url.Action( "DisplayImage" , "User" , new { id = item.id} ) %>" alt="" /></td>
Posted by: Guest on February-02-2021
0

How can I display image from database in asp.net mvc. I created image table and image path as varchar

public FileContentResult DisplayImage(string id)
    {
        byte[] image = repository.GetImage(id);
        return File(image, "image/jpg");
    }
Posted by: Guest on February-02-2021

Code answers related to "How can I display image from database in asp.net mvc. I created image table and image path as varchar"

C# Answers by Framework

Browse Popular Code Answers by Language