The name 'Scripts' does not exists in the current context in MVC

前端 未结 5 2156
被撕碎了的回忆
被撕碎了的回忆 2020-12-07 22:33

In my mvc application, In the _Layout.cshtml has code below...


    
    

        
5条回答
  •  死守一世寂寞
    2020-12-07 23:04

    The following in .chtml solves the problem

    @using System.Web.Optimization
    @Scripts.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    

提交回复
热议问题