In my mvc application, In the _Layout.cshtml has code below...
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
But the problem is it says The name 'Scripts' does not exists in the current context
.
I have already added the assembly to the reference and to the Bundle config as using System.Web.Optimization;
This happens for @styles also..
What should I do?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…