How do I add a period after @viewDataTeam.ID to display an image?

时间:2017-04-10 02:40:36

标签: asp.net-mvc

I want to display an image and the file name is from a viewData so here's what I did

<img src="~/Images/team_logo/@viewDataTeam.ID.png" width="50" />

but it gives me an error because it thinks that the .png is a method but what I meant for .png is a file extension.

I could use something like this <img src="~/Images/team_logo/@viewDataTeam.ID _.png" width="50" /> then rename the image to 2 _.png but is there another way so I could use 2.png?

0 个答案:

没有答案
相关问题