HTML, JavaScript, PHP, ASP, .Net, C#, MySQL, Ms. SQL ...
Por mais que o ASP venha a ser substituído pela nova geração ASP.Net, venho utilizando a mesma constantemente. É uma linguagem fácil, possui o conceito de POG, mas vamos lá.
No ASP.Net, costuma-se utilizar uma ferramenta chamada MASTER PAGES; esta página, por exemplo, utiliza esta ferramenta.
Para entender melhor, uma página normal é constituída da seguinte maneira:
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
AQUI VAI O CONTEÚDO
</body>
</html>
Vamos melhorar um pouco mais... Imagine que você tenha um site igual o meu, e o menu ao lado que quase nunca muda, onde o mesmo aparece em todas as páginas. Ficaria fácil separar esta página em 4 partes:
Este é o código padrão (Sem divmania, porque os engenheiros da Fundação Mozila e os da Microsoft não são os mesmos que adotaram padrões W3C, ok?):
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<div id="topo">
Aqui vai o topo
</div>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td id="menu">
Menu
</td>
<td id="conteudo">
Conteúdo
</td>
</tr>
</table>
<div id="rodape">
Rodapé
</div>
</body>
</html>
Este é o mesmo código padrão, dividido em 3 partes e utilizando o método INCLUDE:
Topo + menu - arquivo topo.asp
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<div id="topo">
Aqui vai o topo
</div>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td id="menu">
Menu
</td>
<td id="conteudo">
Conteúdo
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Rodapé - arquivo rodape.asp
</td>
</tr>
</table>
<div id="rodape">
Rodapé
</div>
</body>
</html>
Finalmente, temos a página com conteúdo da seguinte maneira:
<!--#include file="topo.asp">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
<!--#include file="rodape.asp">
Para trocar o título de TODAS as páginas que você criou, abra o arquivo TOPO.ASP e edite o parâmetro.
Fazendo este procedimento, ganhamos produtividade, entre elas: