For many companies, their web development team is seperated into two distinct camps - developers (those who code) and designers (those who make the output look nice). In many cases developers are also looking for simple ways to develop a complex website. This site uses two template types, the first is a HTML template that defines the basic layout of the page - this is achieved using standard HTML tables - the second uses Javascript to add a consistant Header bar - including menu - and footer to all the pages. In this example, we are going to develop a simple template and then populate it using ASP and investigate the advantages and some of the options of this approach.
Lets start by designing our template HTML page. This page needs to contain the skeleton for our site and some identifiable tags which we can later replace with the output of our ASP, exmaples of this could include the following :
- Page Title
- Page Heading
- Navigation elements
- Page Footer
- & the page content itself
In the next section, we will look at how we use ASP to read in the template file and replace it with some static data and then some data from a database.