Compare strings

J

JW

Hi,

I'm trying to see if a certain string matches a predefined string so I've
tried:
--------------
If txtCondition3 = "NO THEFT COVER unless client claim free and occupied
prems for 3 yrs" Then
response.write "1st condition"
Else
response.write "2nd condition"
End If
--------------
But I'm getting neither response!!!

Any ideas why that would be?

Thanks, Jon
 
R

Ray at

That's not possible. It's either true or false. There is no inbetween.
Are you sure these lines of code are executing? Are they nested within
another if or a sub that you're not calling or something like that?

Ray at work
 
E

Evertjan.

JW wrote on 06 okt 2003 in microsoft.public.inetserver.asp.general:
Hi,

I'm trying to see if a certain string matches a predefined string so I've
tried:
--------------
If txtCondition3 = "NO THEFT COVER unless client claim free and occupied
prems for 3 yrs" Then
response.write "1st condition"
Else
response.write "2nd condition"
End If

If you have the quoted string in one line it surely works
 
J

JW

Thanks for the reponse - it had worked fine! Like a &*$%^ I'd misplaced my
response on the page!!
Sorry for troubling you
Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top