ASP MVC CSS Import

I am new to ASP.NET MVC and I am trying to include a CSS file in my view.

The view is strongly typed and has a Scaffold list template, it is connected to the main page, which itself is connected to the css file and works fine for the main slide, but when trying to link the view to a separate css file. I can’t include tags.

Does anyone know how I can solve this?

+1
source share
2 answers
<link href="@Url.Content("~/Content/YOURSTYLESHEET.css")" rel="stylesheet" type="text/css" /> 
+6
source

You must add the new owner of the placement on the .master page in the headings, I always have one heading "HeadContent", which I use to include scripts and css that I want only on separate pages.

+4
source

Source: https://habr.com/ru/post/925752/


All Articles