This is similar to relative path to CSS file [closed]. but it's about Java web application
and what I am talking about is .NET
. They're the same?
I am having an issue with ASP.NET core. In the Index.cshtml
, there are some codes, which include CSS static files:
...
<link href="~/css/features.css" rel="stylesheet">
<link href="~/css/carousel.css" rel="stylesheet">
...
The problem is that I am getting 404 error
on the web page. Seems like the path is not correct in the code. see the attached screenshots:
How can I resolve this? Why it causes an issue?
FYI: I am attaching the screenshots of the folder structure and code snippets.