Using sections in Editor/Display templates

后端 未结 8 989
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 17:15

I want to keep all of my JavaScript code in one section; just before the closing body tag in my master layout page and just wondering the best to go about it, M

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 17:47

    @Darin Dimitrov and @eth0 answers to use with bundle extention usage :

    @Html.Resources(a => new HelperResult(b => b.Write( System.Web.Optimization.Scripts.Render("~/Content/js/formBundle").ToString())), "jsTop")
    

提交回复
热议问题