s.k.paul s.k.paul - 8 months ago 65
CSS Question

Adding .css in ASP.Net 5 MVC 6

I am trying to explore MVC6 application. I selected Framework 4.6 and Empty ASP.Net preview template. Using Visual studio 2015.

I have .css file under


And trying to use in index.cshtml as

<link href="../../css/css.css" rel="stylesheet" />

also tried

<link href="~/css/css.css" rel="stylesheet" />

But it's not working. Is here any technique required?


You have to tell ASPNET5 to use static files. In startup.cs add


in the Configure() function