Documentation

Bundles helper

The static helper class Bundles provides methods to reference bundles and render HTML.

To use the Bundles helper in views/pages, you'll need the following in Web.config:

<configuration>
    <!-- For Razor views (cshtml/vbhtml) -->
    <system.web.webPages.razor>
        <pages>
            <namespaces>
                <add namespace="Cassette.Views"/>
            </namespaces>
        </pages>
    </system.web.webPages.razor>

    <!-- For WebForm pages (aspx) -->
    <system.web>
        <pages>
            <namespaces>
                <add namespace="Cassette.Views" />
            </namespaces>
        </pages>
    </system.web>
</configuration>

The Cassette.Views nuget package will add these for you. However, if using MVC areas, you will need to manually add the namespace in each per-area web.config file.