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
?