In the controller, I have the "GetPhoto" action:
public FileResult GetPhoto(int id) { ... }
Also, I have a Razor code where I am trying to dynamically add an ID parameter from a model:
@model ISPIS.Models.KodFazeBiljke ... <img src="@Url.Action("GetPhoto", new { id = model.KodFazeBiljkeId })" alt="" width="250" height="190"/>
However, it is not possible to write "id = model.KodFazeBiljkeId" because the model does not exist in the current context.
Any solution? Thanks!
source share