1

i want to display images in mvc.net? help anybody :)... im uploading images through silverlight control and storing them on directory at my hard disk

1
  • what is your platform? ASP.NET? WPF? Silverlight? Winforms? Commented Aug 7, 2010 at 7:45

1 Answer 1

4

i assume that you like to create an action which give the picture to the client, that's easy.

 public ActionResult ResizedPicture(int pictureId)
 {
   var picturePath= GetPicturePathFor(pictureId);
   return File(picturePath, "image/jpeg"); 
 }

The Story is the return a FileResult, they are plenty overload for FileResults, so that can return an Stream, Byte-Array or give the path to a file.

GetPicturePathFor() is a not part of mvc.

Sign up to request clarification or add additional context in comments.

1 Comment

tnx Albert i found the answer at: highoncoding.com/Articles/… if anybody else wants to consult ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.