Can't get string from url after include

Results 1 to 4 of 4

Thread: Can't get string from url after include

  1. #1
    Carol Bloch Guest

    Default Can't get string from url after include

    I have a page , we can call PAGE1, with the following URL string<BR>/PAGE1.ASP?VENDOR=VENDORA<BR>The first thing in the page is an include statement:<BR>&#060;!-- #INCLUDE FILE="include/xt_main.asp" --&#062;<BR><BR>This include has a few functions and sets up a few constants<BR>and variables. It has the OPTION EXPLICIT statement at the top<BR>of the include file.<BR><BR>I tried the following in PAGE1<BR><BR> &#060;!-- #INCLUDE FILE="include/xt_main.asp" --&#062;<BR> &#060;%<BR> Dim wlkrStringVndr <BR><BR> wlkrStringVndr = Request.QueryString("VENDOR")<BR> Response.Write "wlkrStringVndr " & wlkrStringVndr & "<BR>"<BR> %&#062;<BR><BR> The result I get is:<BR> wlkrStringVndr <BR><BR>If I put the same code in include file xt_main.asp, I get<BR>the correct result:<BR> wlkrStringVndr VENDORA<BR><BR>If I put the "wlkrStringVndr = Request.QueryString("VENDOR")"<BR>statement in xt_main, but the display in PAGE1, wlkrStringVndr<BR>displays as blank. It seems to me that my ability to reference<BR>the querystring field is gone after the include. Can anyone<BR>give me a clue as to how that can happen?

  2. #2
    Grubby Guest

    Default RE: Can't get string from url after include

    u should try &#060;!--#include VIRTUAL=etc/etc--&#062; or else keep it as FILE= but I do believe you need to use backslashes in this case rather thjan forward as you have. You might want to try the full path "http://etc" or "d:inetpubetc" just to get it working.<BR><BR>Hope that helps :)

  3. #3
    Join Date
    Dec 1969

    Default RE: I don't understand this answer

    I don&#039t understand your answer. Does it matter how it is included? The include file is being included in the page.<BR>Other variables and constants that are set up in the include<BR>are being used in the rest of the page. It&#039s is just the <BR>URL string that I can&#039t seem to access in the main page.

  4. #4
    Join Date
    Dec 1969

    Default RE: I don't understand this answer

    it shouldn&#039t make any difference,<BR><BR>really

Posting Permissions

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