Stuff a variable

Results 1 to 2 of 2

Thread: Stuff a variable

  1. #1
    Corin Guest

    Default Stuff a variable

    Anyone know off hand the syntax to stuff an include file into a variable?<BR><BR>Something like<BR>myVar= &#060;!-- #INCLUDE FILE="myInclude.asp" --&#062;<BR><BR>The include file contains a long string

  2. #2
    asphead Guest

    Default RE: Stuff a variable

    You cant really do what you want. But there are a couple of alternatives.<BR><BR>1. Depending on how the include file is created, just create the include with a variable all ready assigned, like this:<BR><BR>&#060;%<BR>&#039include file<BR>MyVar ="My String is long"<BR>%&#062;<BR><BR>then after you use the &#060;!-- #INCLUDE FILE="myInclude.asp" --&#062; in your asp page you can refer to MyVar.<BR><BR>2. Another way to accomplish this is to open the include file with the filesystem object and read the line into the variable. <BR><BR>

Posting Permissions

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