On many occasions, you may want to group page content into smaller blocks in order to achieve better clarity and a better standard. In this way, the block can be recycled in all templates, and if you want to make a change, e.g. to the appearance of the page, this will be passed straight onto all page templates.
A good way of doing this is to use user controls on the .aspx page. User controls are one of the innovations in the .NET platform upon which EPiServer is based.
Example:
<development:prefix ID="pagePrefix" runat="server"></development:prefix>
<development:mainbody ID="pageBody" runat="server"></development:mainbody>
<development:listing runat="server" ID="pageToolMenu"></development:listing>
<development:suffix runat="server" ID="pageSuffix"></development:suffix> |
The user control needs to be defined in the .aspx page. An example of how to do that:
| <%@ Register TagPrefix="development" TagName="Prefix" Src="~/templates/prefix.ascx"%> |