homepage Welcome to WebmasterWorld Guest from 23.20.63.27
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Ignore Case .asp
How to set in simple request
Marshall




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

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

 

phranque




msg:4585686
 11:30 am on Jun 19, 2013 (gmt 0)

try StrComp

Marshall




msg:4585707
 12:30 pm on Jun 19, 2013 (gmt 0)

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

Marshall

dstiles




msg:4585868
 8:13 pm on Jun 19, 2013 (gmt 0)

Force the case using (eg) LCase(text) or use instr (see W3schools for syntax) - if (instr(...)>0) then...

Marshall




msg:4585878
 8:42 pm on Jun 19, 2013 (gmt 0)

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

Works perfectly. Thanks :)

Marshall

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved