Hi
I want to define Css files only once in the project. Where i can add them
Thanks
Hi
I want to define Css files only once in the project. Where i can add them
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Apr 29, 2024, 4:20 AM
Hello Ramco,
Please elaborate more so we can better undestand?
In the market right now lot many projects are available which one you are asking here didn't understand.
Thanks
Jignesh KumarPosted Apr 28, 2024, 10:34 AM
Hello Ramco,
In a .NET project, you typically define CSS files in one common location and reference them across your application.
Here are some common approaches based on your project and technologies used,
wwwroot folder: In ASP.NET Core projects, you can place your CSS files in the
wwwrootfolder. This folder is publicly accessible and is used to serve static files like CSS, JavaScript, and images. You can organize your CSS files within subfolders as needed.Content folder: In older ASP.NET MVC projects, you might find a
Contentfolder where CSS files are traditionally stored. While not mandatory, this is a common convention for organizing static content.Custom directory: You can create a custom directory within your project specifically for CSS files. This can be named anything you prefer and organized according to your project's structure.
You can refer to this CSS in your HTML page like below,