Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Specifying page titles when using ASP includes

    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!

    Kindest Regards,

    Gary

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,065
    Thanks
    4
    Thanked 8 Times in 8 Posts
    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" -->

  • #3
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Miranda, that's just great - just what I was looking for

    Many thanks,

    Gary


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •