variable? constant?

Results 1 to 2 of 2

Thread: variable? constant?

  1. #1
    Join Date
    Dec 1969
    Posts
    569

    Default variable? constant?

    I have a set of variables that I want to declare at the top of a file. It is kind of a unique situation. The variables will be hard coded in the file (I guess they aren&#039t variables then) and these values declared at the top of the file need to be passed to an include file. Here is an example:<BR><BR>&#060;%@ LANGUAGE=VBScript %&#062;<BR><BR>&#060;%<BR><BR>Dim strVar1<BR>Dim strVar2<BR><BR><BR>strVar1 = I want to write the value here<BR>strVar2 = 13 <BR><BR>etc...<BR><BR><BR><BR>%&#062;<BR><BR>&#060 ;!--#include file="test2.asp"--&#062;<BR><BR>I want those to appear in the file using & strVar1 &<BR><BR>Any solutions? <BR>Thanks in advance<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    572

    Default RE: variable? constant?

    If you dim and set your variables in the body of "test2.asp" (outside of functions), and then include test2.asp in the other page, those variables will be available in that page.

Posting Permissions

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