Reputation: 317
I have a need to add META tags inside my HEAD tag using classic ASP vbscript server side code. I am working with a system that uses a header include file (which includes the HEAD tag) on every page. I cannot change this layout. I need to add META content to the HEAD tag using server side code on my individual .asp pages.
Is this possible? If so, how? Thanks!
Upvotes: 0
Views: 1404
Reputation:
That's fairly straightforward.
You can add a meta tag simply by coding it into your VBScript on the server side. For instance, consider:
<%
dim metaString
metaString = "<meta name=""author"" content=""" & myName & """ />"
%>
Then in your <head>
tag you can try...
<%= metaString %>
Obviously the code that defines the metaString
in the first place must appear before the use of the variable.
Upvotes: 2