Forums

ASP

This topic is locked

Showing hyperlink only if field is not NULL

Posted 29 Mar 2002 17:28:34
1
has voted
29 Mar 2002 17:28:34 Jason Wise posted:
I want to show a Company's link but only if the field exists. If there is no entry in the field, I just want to display the Company Name without a link. I was trying to accomplish this by using the following code:

<img src="www.bluewater-tech.com/public/code.gif " border=0>

Any suggestions???

Replies

Replied 29 Mar 2002 20:07:49
29 Mar 2002 20:07:49 Hank Tan-Tenn replied:
Hi,

There should not be an equal sign after &lt;% in all the ASP lines *except* the line outputting the company name. (The equal sign indicates you want to output the value. The other way is to do a Response.Write.)

Also, the ELSE line should be

Response.Write (rsCust.Fields.Item("CP".Value)

(BTW, I think it's easier if you paste the code rather than an image.)

Edited by - akc on 29 Mar 2002 20:13:05

Edited by - akc on 29 Mar 2002 20:14:55

Reply to this topic