@Scripts doesn't exist in Asp.Net MVC

删除回忆录丶 提交于 2019-12-25 09:09:27

问题


I'm trying to add Model validation in Asp.Net MVC ,
So I need to import the libraries at first inside Views\Share_Layout.cshtml .

Then it kills me in a second.

@Scripts doesn't exist

What is going on ? If some further information needed , please tell me. Thanks :)


回答1:


  1. Install Microsoft.AspNet.Web.Optimization
  2. In web.config (Views folder) make sure you have under namespaces <add namespace="System.Web.Optimization"/>


来源:https://stackoverflow.com/questions/43159078/scripts-doesnt-exist-in-asp-net-mvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!