; 'This routine checks the Dictionary for the text passed to it.
'If it finds a key in the Dictionary it Display the value to the user.
'If not, by default it will display the full Token in the HTML source so that you can debug your templates.
if g_oDict.Exists(inToken) then
Response.Write(g_oDict.Item(inToken) & VbCrLf)
else
Response.Write("<!--[%" & inToken & "%]-->" & VbCrLf)
end if
end sub
end class
%>
3.template.html 模板文件
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>[%TITLE%]</title>
</head>
<body>
<table border="0" width="785" align="center" cellspacing="0" cellpadding="0" class="largetable">
<tr>
<td rowspan="2" height="100%" width="150" valign="top" align="right">[%MENU%]</td>
<td valign="top" width="635" class="caption" align="center">[%QUOTE%]</td>
</tr>
<tr>
<td valign="top" bgcolor="#b0c4de" width="635" class="layout">[%CONTENT%]</td>
</tr>
<tr>
<td colspan="2" width="785" align="center" class="caption">[%COPYRIGHT%]</td>
</tr>
</table>
</body>
</html>
演示地址:http://www.cnaspol.com/tmpcode/index.asp
'If it finds a key in the Dictionary it Display the value to the user.
'If not, by default it will display the full Token in the HTML source so that you can debug your templates.
if g_oDict.Exists(inToken) then
Response.Write(g_oDict.Item(inToken) & VbCrLf)
else
Response.Write("<!--[%" & inToken & "%]-->" & VbCrLf)
end if
end sub
end class
%>
3.template.html 模板文件
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>[%TITLE%]</title>
</head>
<body>
<table border="0" width="785" align="center" cellspacing="0" cellpadding="0" class="largetable">
<tr>
<td rowspan="2" height="100%" width="150" valign="top" align="right">[%MENU%]</td>
<td valign="top" width="635" class="caption" align="center">[%QUOTE%]</td>
</tr>
<tr>
<td valign="top" bgcolor="#b0c4de" width="635" class="layout">[%CONTENT%]</td>
</tr>
<tr>
<td colspan="2" width="785" align="center" class="caption">[%COPYRIGHT%]</td>
</tr>
</table>
</body>
</html>
演示地址:http://www.cnaspol.com/tmpcode/index.asp
| 对此文章发表了评论 |
