When developing websites most of them have common elements like headers, footers and navigational menus that are common throughout the site. In Classic ASP we mostly use multiple server side includes to accomplish this. I like ASP.NET master pages and this page details the technique I use to achieve something similar in Classic ASP.
My technique involves creating a master page ASP file which has all the common elements. Where ever I want content to be added I add a call to a sub routine.
Then in my content pages when I want the master page content to be added I include it at that point. I then create a sub routine for each content area and put my content inside these. You can have as many content sub routines as required but they must exist in every content page that uses that master page.
Any ASP variables that are needed by more than one content area should be created outside of the sub routines.masperpage.asp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">content-page.asp
<% Call HeadPlaceHolder() %>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
Logo etc etc
<% Call ContentPlaceHolder() %>
Copyright etc etc
'Any ASP variables that are needed by multiple contenbt areas should be declared
'outside of the sub routines
'It's a good practice to keep your ASP script at the beginning of your pages anyway
<% Sub HeadPlaceHolder() %>
<title>My page title</title>
<meta content="My meta description" name="description" />
<% End Sub %>
<% Sub ContentPlaceHolder() %>
<p>My page content goes here</p>
<% End Sub %>