Why Asp.Net MVC 5 put @Scripts.Render(“~/bundles/jquery”) at the bottom in _Layout.cshtml?

前端 未结 4 1774
臣服心动
臣服心动 2021-02-04 02:18

I put

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-04 02:32

    You can use sections :

    in your layout :

    ...
    
    
    @RenderSection("scripts", required: false)
    ...
    

    in yours cshtml :

    @section scripts {
        
    }
    

提交回复
热议问题