Showing an image after laoding it from sql database
- by user330075
I have a problem showing the image form database in a view Details and a ImageController. Inside the view i have:
img src=Url.Action("GetFile","Image", new {id= Model.id})
and in controller:
public FileContentResult GetFile(int idl)
{
//int idl = 32;
SqlDataReader rdr; byte[] fileContent = null;
...........
return File(,,);
}
When the view is called, function GetFile it just wont work,but if i cut out the parameter int id1 and i instantiate it as a variable it'l work.
public FileContentResult GetFile()
{
int idl = 32;
SqlDataReader rdr; byte[] fileContent = null;
...........
return File(,,);
}
Why?