在我的 cshtml 页面中我有 <img src="/controllerName/actionName" />
这在我测试时非常有效.. 但是一旦我发布 img
被打破。发布时如何保留图像?我在图像的 src 中调用的操作返回 return File(key.ToWebImage().GetBytes(), "image/jpeg");
有没有其他方法可以让图像在发布时保留下来?
感谢任何帮助。
最佳答案
我想通了。我只需要:
<img src='@Url.Action("actionName", "controllerName") />
关于html - 在 <img> 的 src 中调用 Controller Action ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35947719/