I have:
@:<img src="@Url.Content("~/content/images/lesson_icon/")@mi.LessonId .png" />
But it renders as ...lesson_icon/d40d2ff2-d06b-4fd8-80a0-0ed31bbc04eb%20.png
How can I get rid of the %20 in front of .png ?
You have a space before your file extension that you should remove there:
<img src="@Url.Content(string.Format("~/content/images/lesson_icon/{0}.png", mi.LessonId))" />
or if you are using Razor v2 you could try that:
<img src="~/content/images/lesson_icon/@(mi.LessonId).png" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With