I would like to have a common head section (for meta tags etc) across all pages. Can I use something like:
<head>
<!--#include file="head.asp"-->
</head>
to do this? Also, must ASP server side includes contain matching tags, or can I open a tag in one include and close it in another?
Thanks.
Yes you can do this. You can put an include file anywhere you want as long as it does not contain something that needs to be at a specific location. E.g. an include file containing
<%@ language="vbscript" %>must be included at the very beginning of your script.Secondly it is OK to open a tag in one file and close it in another but normally is poor practice and you have to be careful.
In case you want to check the order of HTML + raw ASP code you can rename the external file from
.aspto.shtml. When a shtml file is viewed over IIS, it will process all #include statements but it will not execute the ASP code.