homepage Welcome to WebmasterWorld Guest from 54.166.113.249
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4585667 posted 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

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



 
Msg#: 4585667 posted 11:30 am on Jun 19, 2013 (gmt 0)

try StrComp

Marshall

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4585667 posted 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

WebmasterWorld Senior Member dstiles us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4585667 posted 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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4585667 posted 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