This is my first time doing mvc, so I don’t know a lot of things! ! ! !
The path I dragged into this picture is correct! ! !
But it just can’t be displayed:
Baidu said yes
<img src="@Url.Content("logo-gif.gif")" />
Written like this, but it still doesn’t show up! ! !
Please help me, thank you!
淡淡烟草味2017-05-16 17:07:53
The website cannot access the contents of the Views folder by default.
But it can be changed.
There is a web.config file under Views, and the following code in it prevents request processing in the Views folder
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
怪我咯2017-05-16 17:07:53
Oh. It’s been solved. It’s weird. Pictures can’t be placed under the sharepage folder. I just create a new folder. -_-||