CHAN Reference

Chan Home | Reference Home | Event Firing Order | web.config

   

Template

     
  • Name Template
  • CSS Class NA
  • Type NA

The Template class works as an intermediary between the Chan.Page's ASPX and a raw HTML file. It takes the contents of the ASPX, as well as any script and style definitions and places them in pre defined "Regions" within the HTML file.

In order to use a Template you must first create it and bind it to your page in the Page's Template_Init() method. This method is called before any other Page event especially for template binding. It is possible to assign the template at any point up to and including the Page_PreRender function, but this would be considered an advanced use case and is not recommended for simple sites. Instead you should create a base Page class that impliments Template_Init and derive your site's pages from that.