I've been doing this for about 16 years and I've never had a problem or misinformation and misdirection as I have with something as trivial as adding an image to a webpage.
I created a new MVC site .NET Framework 4.6.2 with Individual user accounts and I also added angular
and am serving up partial razor pages and angular through the area section.
I tried to place an image into the _Layout and couldn't get it to work, then abandoned that to just put an image in a <div> in one of my partials.
<div style="padding-top:25px"> I'm the Test page
<img src="~/Content/WeCare.jpg" /><img src='<%= Url.Content("~/Content/Images/WeCare.jpg")%>' alt="Test Pic" /></div><ui-view></ui-view>
I've tried ever configuration of adding the image and changed the location of the images based on other posts I read and nothing works? I just get 404's
I've even tried adding...
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { app.UseStaticFiles(); }
to my Startup.cs because someone told me this is what was missing.
How can it be this hard to add an image to a webpage...I must really be missing something or not understand how this works at all?
Thanks for any help, sorry for the frustration.