0
I am trying to replicate the same image in the header of all pages, but it appears broken. What can it be? It is a program done in c#, Asp.net. I already searched but could not fix. From what I understand, it is some problem in the file _Layout.cshtml, which is in the folder Shared. Look at the situation:
The image is in the Images folder, which I put inside in the View/Shared folder. It follows the code of the _Layout.cshtml file:
<!DOCTYPE html>
<script src="~/Scripts/Js.js"></script>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("Cooperativa de Médicos do DF", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse text-right">
<ul class="nav navbar-nav ">
<li>@Html.ActionLink("Sair", "Index", "Home")</li>
<img src="images/icone.png" id= "simbolo" alt="símbolo dos médicos"/>
</ul>
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<br /><br /><br /><br /><br /><br /><br /><br />
<hr />
<footer class="text-center">
<p>© @DateTime.Now.Year - Cooperativa de Médicos do DF</p>
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/inputmask")
@RenderSection("scripts", required: false)
</body>
</html>
Hello, Leandro! When I do this, the image of the home page that was showing, also does not open.
– Kaka Takeda
You left the file on wwwroot/images?
– Leandro Angelo
@Kakatakeda Where is your directory
images
– Leandro Angelo