图片未在剃须刀页面上加载

时间:2019-10-24 17:43:12

标签: c# .net

enter image description here

我的剃须刀页面中有一些图像,这些图像存储在wwwroot文件夹下...但是由于某种原因它不起作用,我添加了

  app.UseStaticFiles();

启动,但仍然无法正常工作

我的剃须刀页面恢复了

@{
  var apiPath = "http://localhost:5000";
  var imagePath = apiPath + "/StaticFiles/";
  var faceLogoPath = imagePath + "images/facebook-logo.png";
  var instaLogoPath = imagePath + "images/instagram-logo.png";
  var youtubeLogoPath = imagePath + "images/youtube-logo.png";
  var mrvLogoPath = imagePath + "images/logo-mrv-mobile.png";
}
   <td align="left" style="font-family: Verdana, Helvetica, Arial, sans-serif; font-weight: bold; font-size: 24px; line-height: 32px; color: #ff8b22; word-spacing: 0; text-align: left; padding-left: 40px; padding-right: 40px;">
        <img
            src="@mrvLogoPath"
            alt="MRV"
            width="90"
            height="26"
            style="display:block; width:90px; height:26px;"
          />
  </td>

0 个答案:

没有答案