mardi 28 juin 2016

How to use @Scripts in MVC3 VS10 application

I have a MVC3 application in Visual Studio 2010 . I need to refer the scripts/styles in layout page using following tag

@System.Web.Optimization.Styles.Render("~/Content/css")
@System.Web.Optimization.Scripts.Render("~/Scripts/script")

But I am unable to use like this, since System.web,optimization is not available from _Layout.cshtml( even though the dll is referred in the project). how to resolve this?

Aucun commentaire:

Enregistrer un commentaire