* Template and out-put view:
Use F5 and F7 so run & see out put and to switch to the code view.
* Reusing templates:
In the master page, register as:
<%@ Register Name="SubTemplate" Template="SubTemplate.cst" %>
and render the sub-template content in the master template as
<% new SubTemplate().Render(this.Response); %>
* Code behind page:
In the template page, use the following line to consider the code-behind page
<%@ CodeTemplate Src="CodeBehind.cst.cs" Inherits="SampleCodeBehindClass" Language="C#" TargetLanguage="C#" Description="Demonstrates the most basic template." %>
In the code behind page, consider the code behind class, as follows:
using System.ComponentModel;
using CodeSmith.Engine;
public class SampleCodeBehindClass : CodeTemplate
{
...