@Scripts doesn't exist in Asp.Net MVC

2019-09-19 03:34发布

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

@Scripts doesn't exist

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

1条回答
再贱就再见
2楼-- · 2019-09-19 04:08
  1. Install Microsoft.AspNet.Web.Optimization
  2. In web.config (Views folder) make sure you have under namespaces <add namespace="System.Web.Optimization"/>
查看更多
登录 后发表回答