Welcome to WebmasterWorld Guest from 23.20.101.42

Forum Moderators: ocean10000

Message Too Old, No Replies

Ignore Case .asp

How to set in simple request

     
10:55 am on Jun 19, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts: 2170
votes: 11


I have a fundamental understanding of .asp and am trying to get this to ignore case:

IF Request.ServerVariables("URL")="/blah-blah.asp" THEN
instructions....
END IF

Is there a simple way of doing it? Any help would be appreciated.

Marshall
11:30 am on June 19, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10551
votes: 10


try StrComp
12:30 pm on June 19, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts: 2170
votes: 11


Huh? Where, and how, would I put that? FYI, the "instructions" are response.write if it matters.

Marshall
8:13 pm on June 19, 2013 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member dstiles is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:May 14, 2008
posts:3117
votes: 3


Force the case using (eg) LCase(text) or use instr (see W3schools for syntax) - if (instr(...)>0) then...
8:42 pm on June 19, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts: 2170
votes: 11


IF (LCase(Request.ServerVariables("URL")))="url..."
response.write....
END IF

Works perfectly. Thanks :)

Marshall