I have defined bundles and I am trying to use them in my spark layout with the following syntax.
${Scripts.Render("~/bundles/jqueryPlugins")}
${Scripts.Render("~/bundles/jqGridJqueryPlugins")}
${Scripts.Render("~/bundles/jqPlotJqueryPlugins")}
I am getting the following error
Dynamic view compilation failed.
The name 'Scripts' does not exist in the current context
The name 'Scripts' does not exist in the current context
The name 'Scripts' does not exist in the current context
Its not working. What is the correct syntax for this ?
Also whats the syntax to include references on the page ? Like in razor we use @using Blah.Blah
The
ScriptsandStylesclasses are static objects in theSystem.Web.Optimizationnamespace, so all you need to do is reference this namespace and you can use them. add this to the spark section in your Web.config:and then you can do: