[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

If value is not one of statement

Posted on 2005-04-13
4
Medium Priority
?
228 Views
Last Modified: 2010-05-18
Hi.

I have the following IF statement within an ASP page

<% if (Recordset1.Fields.Item("productimage").Value) <> "albafill1.jpg" then %>

My problem is that I would like to check that my productimage value is not equal to "albafill1.jpg" OR "albafill2.jpg"

I am struggling with the correct syntax to check that my value is not equal to more than one value.

Can anyone assist?

Thanks in advance

Grant
0
Comment
Question by:grantballantyne
  • 3
4 Comments
 
LVL 35

Expert Comment

by:mvidas
ID: 13775724
Hi Grant,
You should just be able to use

<% if (Recordset1.Fields.Item("productimage").Value) <> "albafill1.jpg" or (Recordset1.Fields.Item("productimage").Value) <> "albafill2.jpg" then %>

Matt
0
 
LVL 35

Accepted Solution

by:
mvidas earned 1000 total points
ID: 13775730
Please substitute the "or" in my above comment to "and", many apologies
0
 

Author Comment

by:grantballantyne
ID: 13775758
Thanks mvidas,  that worked
0
 
LVL 35

Expert Comment

by:mvidas
ID: 13775855
Glad to help!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Screencast - Getting to Know the Pipeline

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question