Adding jQuery code to ASP.NET Boilerplate

前端 未结 2 1504
后悔当初
后悔当初 2021-01-26 05:00

I have a project using ASP.NET Boilerplate. I want to add more functionality by using jQuery.

I try to write a simple code such as (below) to the end of a page (such as

2条回答
  •  死守一世寂寞
    2021-01-26 05:30

    Here is the process to proper execution; check @RenderSection and @section in below files

    _Layout.cshtml

    
    
    
        
        @Styles.Render("~/Content/css")
        @Scripts.Render("~/bundles/modernizr")
    
    
    
        
    
        
    @RenderBody()
    @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") @RenderSection("scripts", required: false)

    view.cshtml

    
    @section Scripts {
    
        
    
    }
    

提交回复
热议问题