XML•Describe Your Web Site With a Template

Listing 1. This XML document is a template you can use to describe the overall structure of a Web site. It lets you embed different UserControls, PlaceHolders, and Server controls anywhere within the template. Content from an ASP.NET page running in the template framework is added dynamically wherever you define the ContentPlaceHolder tag.

<html xmlns:template=
   "http://www.xmlforasp.net/templates">
   <head>
   <title>XML for ASP.NET 
   Developers</title>
   <script language="javascript" 
   src="Scripts/scripts.js"></script>

   <link rel="stylesheet" 
      type="text/css" 
      href="Style/style.css" />
   </head>
   <body bgcolor="#ffffff" 
      topmargin="0" leftmargin="0">
      <form id="frmPageForm">
         <table class="tableBorders" 
            border="0" width="759" 
            cellpadding="0" 
            cellspacing="0">
         <tr>
         <td colspan="2" 
            align="left" 
            valign="top">
         <template:UserControl 
            id="ucHeader" 
            src=
   "UserControls/Header.ascx" />
            </td>
         </tr>
         <tr>
            <td align="left" 
               valign="top" width="164"
               bgcolor="#02027a">
               <template:UserControl 
                  id="ucNavigation" 
            src=
   "UserControls/Navigation.ascx" />
               <template:UserControl 
                  id="ucPartners" 
            src=
   "UserControls/Partners.ascx" />
            </td>
            <td align="center" 
               valign="top" 
               width="595">
            <template:ContentPlaceHolder 
         id="Content"/>
            </td>
         </tr>
         <tr>
            <td colspan="2">
            <template:UserControl 
               id="ucFooter" 
               src=
   "UserControls/Footer.ascx" />
            </td>
         </tr>
      </table>
   </form>
   </body>
</html>