Print Page | Close Window

LIKE in ASP

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=18486
Printed Date: 29 March 2026 at 8:32am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: LIKE in ASP
Posted By: zMaestro
Subject: LIKE in ASP
Date Posted: 22 February 2006 at 5:23pm
How can I use LIKE in ASP code?
 
I want to make a code in ASP, says:

IF blah blah LIKE "so" Then Reposne.Write "blah blah"
as this code

IF blah blah = "so" Then Reposne.Write "blah blah"



Replies:
Posted By: Gullanian
Date Posted: 22 February 2006 at 5:35pm
Like is an SQL function, and not unfortunatly in ASP.

To get the same effect as LIKE in ASP, you need to use string manipulation, using left(), right() and mid().  Takes longer and is slightly more tricky but it is possible.


Posted By: ub3rl337ch3ch
Date Posted: 26 February 2006 at 10:41pm
so asp doesnt support wildcards in such statements? i've never tried it before, but now that i think about it its something that you'd think it would have...


Posted By: dpyers
Date Posted: 27 February 2006 at 12:07am
Use Regulat Expressions - the object is RegExp




-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Phat
Date Posted: 27 February 2006 at 4:31am
or Instr() may work

-------------
http://buildit.sitesell.com/sitebuildithome.html - Get a website that sells



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net