Click here to Skip to main content
15,940,550 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a column named Image in my database.i am able to load all the fields in the database including image also,but I am getting only one image in all the rows and that image is related to the mentioned ID.
my code is:
public ActionResult GetImage(int ID)
           var imgquery = (from img in dbContext.Personaldetails where img.ID == ID

                           select new
                               Image = img.Image
               System.IO.MemoryStream outStream = new System.IO.MemoryStream();
               byte[] Image = imgquery.Image;
               return File(Image, "Image/jpg");

In the view,i retrieved by using
<img src="@Url.Action("GetImage/1", "Home")"  alt = "image" /> 

now, i want to display specific images with specific ID value.
Updated 5-Jun-12 0:57am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900