'JQuery' is undefined

前端 未结 19 1550
生来不讨喜
生来不讨喜 2020-12-28 15:21

I am working on a ASP.net project created with local file system settings. I am using MVC and Jquery. Jquery is working fine when I run the application in debug mode i.e. in

19条回答
  •  抹茶落季
    2020-12-28 16:17

    Correct! I have chased this down for days now, when you are using a new MVC project from scratch in VS, it has its own references to JQuery in the Layout.cshtml page. If you are attempting to reference JQuery within a page, it will get overwritten by the reference in the Layout.cshtml page. Comment the code in the masterpage (Layout.cshtml), and it will use your page references.

提交回复
热议问题