Documentation
Documentation version: v1 • v2
Using Cassette in Web Forms
The Cassette Bundles
helper class is in the Cassette.Views
namespace.
You can update your Web.config
file to make this namespace available in all pages.
<configuration>
...
<system.web>
<pages>
<namespaces>
...
<add namespace="Cassette.Views"/>
</namespaces>
</pages>
</system.web>
...
</configuration>
References in pages
Use aspx code blocks to defined references. Use aspx expressions for the render calls.
<%@ Page Language="C#" %>
<%
Bundles.Reference("scripts/lib/jquery.js");
Bundles.Reference("scripts/app/home.js");
%>
<!DOCTYPE html>
<html>
<head>
<title>Web App</title>
<%: Bundles.RenderStylesheets() %>
</head>
<body>
...
<%: Bundles.RenderScripts() %>
</body>
</html>