currently I have a byte array representing my Image in my ViewModel. I display it with the following code:
<img src="@String.Format("data:image/gif;base64,{0}", Convert.ToBase64String(Model.Image))" />
Now I don't want to have a Base64 String in my Source file, but rather a link to a image. Like:
<img src="Images/" + Model.Id"/>
which would return a Image.
How do I write such a method to return a Image link?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…