I was just wondering if it possible to make an ajax request from a view to an action which injects image data directly in to an image tag.
To give more details, i am borrowing some code in stackoverflow.
Controller;
public FileResult GetImage(int id)
{
return File(PhotoHelper.GetImageBytes(id), "image/jpeg");
}
View:
<%= Html.Image("img", "/Photos/GetImage?id=" + Model.Photo.Id.ToString(), "BioPic", new { Width = "350px" })%>
Is it possible to load another another image from GetImage(int ID) using ajax?