navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Use IF in display code?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Use IF in display code?
Page: [1]
 
harris

 

Posts: 27
Joined: 2/7/2002
From: Minnesota USA
Status: offline

 
Use IF in display code? - 3/12/2002 18:34:55   
Hi,
Is there a way to use an IF statement in the following code such that it will display a:xx if the code is not blank (where xx is the code) or nothing if the code is blank.

The way it is incorrectly working right now is that it is always displaying a: - even when the code is blank.

<td>a:<%=FP_FieldVal(fp_rs,"code")%></td>

Thank you!

Chameleon

 

Posts: 84
From: Springfield, MO
Status: offline

 
RE: Use IF in display code? - 3/12/2002 22:45:58   
You can always assign your FP value to a variable and the use an if statement if your DRW is on a diet. It would be something like...

<%DIM strCode
strCode = FP_FieldVal(fp_rs,"code")

If FP_FieldVal(fp_rs,"code") = null then
strCode = whatever
Else
strCode = not null value
End If%>

This is just a general example but you should be able to get what you need wth it.

 

(in reply to harris)
William Lee

 

Posts: 1179
Joined: 1/25/2002
From: Singapore
Status: offline

 
RE: Use IF in display code? - 3/13/2002 0:57:45   


 <td><%If NOT IsEmpty(FP_FieldVal(fp_rs,"code")) Then Response.Write "a:" & FP_FieldVal(fp_rs,"code") %></td> 


William Lee

(in reply to harris)
harris

 

Posts: 27
Joined: 2/7/2002
From: Minnesota USA
Status: offline

 
RE: Use IF in display code? - 3/14/2002 8:31:22   
Thank you Chameleon & William! This is exactly what I was looking for!!

Harris


(in reply to harris)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Use IF in display code?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts