Conditional statements using URL environmental var

Results 1 to 2 of 2

Thread: Conditional statements using URL environmental var

  1. #1
    wadman Guest

    Default Conditional statements using URL environmental var

    I want to display a single line of links in a sitemap (bottom of page) based upon the page the user is on... eg if user is on page abc - links for abc section is displayed..if user is in xyz - links for xyz are displayed etc. I have tried to do this using if...else statements and select statements but so far no success. Can anyone offer some help/solutions....<BR><BR>Thanks in advance<BR>

  2. #2
    Yamaki Guest

    Default RE: Conditional statements using URL environmental

    The best way I can think of doing this is to create an include file with all of the links and which pages they should be displaying on.<BR><BR>Then within this include I would check to see what page I am on, then conditionally display the text. Ex:<BR><BR>&#039;THIS IS THE INCLUDE<BR>&#060;%<BR>thisPage = Request.ServerVariables("SCRIPT_NAME")<BR><BR>Sele ct Case thisPage<BR><BR> Case "abc.asp"<BR> Response.Write("Sub Menu A")<BR> Response.Write("Sub Menu B")<BR> Response.Write("Sub Menu C")<BR><BR> Case "xyz.asp"<BR> Response.Write("Sub Menu X")<BR> Response.Write("Sub Menu Y")<BR> Response.Write("Sub Menu Z")<BR><BR>End Select<BR>%&#062;<BR><BR><BR>Hope this helps.<BR><BR>Yamaki<BR>&#060;&#062;&#060;

Posting Permissions

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