Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a = Helper.Service.GetAttachmentById(id, MembershipProvider.SecurityTicket);
- if (a == null)
- {
- return View(new ImagePlaceHolderViewData(new { Id = id }));
- }
- return View(new ImagePlaceHolderViewData(new { Id = a.Id, Image = a, FileContent = File(a.Data, a.ContentType) }));
- <img src="<%=Model.FileContent.FileContents %>" />
- <img src="<%=Model.FileContent%>" />
- <img src="<%=Model.FileContent.FileContents %>" />
- <img src="/image/result/12345" />
- public class ImageController : Controller
- {
- public ActionResult Result(int resultID)
- {
- // Do stuff here...
- return File(..);
- }
- }
- <img src="FileStream#1" />
- <img src="/Images/View/1" />
- <img src="data:image/gif;base64,<%=Convert.ToBase64(Model.FileContent)%>"/>
Add Comment
Please, Sign In to add comment