在我看来,我有一个图像,如: img width="150" height="150" scr="@Url.Action("GetImage", "Item")" / 我的控制器ItemController有这个方法: public FileContentResult GetImage(){ var model = _itemService.GetItemImage(1); if(mo
          <img width="150" height="150" scr="@Url.Action("GetImage", "Item")" /> 
 我的控制器ItemController有这个方法:
public FileContentResult GetImage(){
        var model = _itemService.GetItemImage(1);
        if(model != null && model.ImageData != null){
            return File(model.ImageData, model.ImageMimeType);
        }
        return null;
    } 
 当视图呈现时,我得到了我的图像的以下标记,但没有渲染图像:
<img width="150" height="150" scr="/MyApp/ItemManagement/GetImage"/>
如果我在浏览器中输入此URL“http:// localhost / MyApp / ItemManagement / GetImage”,我会得到图像.我不确定这有什么问题.有人可以指出我的代码有什么问题吗?
提前致谢.
杰夫
