Forums

This topic is locked

If/Then/Else Statement HELP

Posted 25 Oct 2002 19:28:57
1
has voted
25 Oct 2002 19:28:57 Peter Lent posted:
I need some helpo with a If Then statement.

I have a DB that contains products, and these products come in different colors. I want to show the product color (image file) if the field is "yes" and show a generic image if the field is set to "no"

Basically If rs.products "color_white" = "yes" then show "X" Else show image "y"

Can someone help me with the actual code for this.

THANKS

-Peter

Replies

Replied 25 Oct 2002 22:23:15
25 Oct 2002 22:23:15 Brent Colflesh replied:
Replied 28 Oct 2002 09:09:56
28 Oct 2002 09:09:56 Vince Baker replied:
<% If rs.products.fields.item("Colour_white".value = "yes" Then %>

COde to show X

<% Else %>

COde to show Y

<% End If %>

Regards
Vince

Response.write("The best line of code you can ever use"

VBScript | ASP | HTML | SQL | Oracle | Hosting

Reply to this topic