...

View Full Version : Specifying page titles when using ASP includes



Graft-Creative
08-13-2005, 01:12 AM
The link below probably explains the problem better than I can.

http://www.halfadot.com/php_noob/tut4-6.php

Obviously it's possible in PHP, but how would you write that up in ASP?

I've searched for ages but not found anything as I'm not really sure how to frame the question! :o

Kindest Regards,

Gary

miranda
08-13-2005, 05:23 PM
php includes are placed within the php delimiters. ASP includes are placed outside of the delimiters. so just change the code to reflect that difference.
Like this

top.asp
<%
Response.Write "<title>"
Response.Write myTitle
Response.Write "</title>"
%>

then on the other page
<%Dim myTitle : myTitle = "foobar"%>
<!--#include file="top.asp" -->

Graft-Creative
08-14-2005, 02:14 PM
Thanks Miranda, that's just great - just what I was looking for :thumbsup:

Many thanks,

Gary



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum