How to add js and css files in ASP.net Core?

前端 未结 5 1166
日久生厌
日久生厌 2020-12-29 23:44

I\'ve been assigned to migrate an application from MVC into ASP.net Core, I\'m new to ASP.net Core. In MVC we have BundleConfig.cs and in there we add reference

5条回答
  •  佛祖请我去吃肉
    2020-12-29 23:56

    In _layout:

    @await RenderSectionAsync("Styles", required: false)
    

    Then your view:

    @section Styles{ your CSS }
    

    Information from: https://dev.to/amjadmh73/loading-custom-css-files-in-razor-pages-4no9

提交回复
热议问题