How to include js files in the view. ASP.NET MVC 4

后端 未结 5 2129
迷失自我
迷失自我 2020-12-03 13:57

I wonder why my js file work when I call it in the view:

@section Scripts {  


        
5条回答
  •  旧巷少年郎
    2020-12-03 14:30

    You should Add rendersection to your Layout Page which your view using.

    @RenderSection("scripts", required: false)
    

提交回复
热议问题