c# - Why can't images be displayed in asp mvc?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-16 17:05:53
0
2
862

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!

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(2)
淡淡烟草味

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>
刘奇

Oh. It’s been solved. It’s weird. Pictures can’t be placed under the sharepage folder. I just create a new folder. -_-||

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template