Evaluating a variable after writing it to a page

Results 1 to 3 of 3

Thread: Evaluating a variable after writing it to a page

  1. #1
    Mark McCarthy Guest

    Default Evaluating a variable after writing it to a page

    I have a given variable a value. The value is a string that will be an include statement.<BR><BR>MENU = "&#060;!--#include file=../../modules/company/menu_general.inc-->"<BR><BR>I later use this variable &#060;%=MENU>.<BR><BR>It only writes the string to the page but doesn&#039t evaluate it as an include statement.<BR><BR>In Cold Fusion I can use an Evaluate(MENU) function. Is there something similar in ASP?<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Evaluating a variable after writing it to a page

    All include files are read before the ASP is parsed! That is why your approach won&#039t work.<BR><BR>See http://www.activeserverpages.com/learn/includedynamic.asp to learn how to include files dynamically! :) You can also read this FAQ, http://4guysfromrolla.com/webtech/faq/Beginner/faq6.shtml, to learn more about using Includes with ASP. Happy programming!

  3. #3
    :) Guest

    Default RE: Evaluating a variable after writing it to a page

    Type in your include before you start ASP, don&#039t assifn it to a variable:<BR>&#060;!-- #include ... --><BR>&#060;%<BR>.<BR>.<BR>.<BR>&#037;&#062;

Posting Permissions

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