Forums
This topic is locked
Display content is datafield is not empty
Posted 21 Jun 2004 11:19:40
1
has voted
21 Jun 2004 11:19:40 xircolaluna potto posted:
Hi,I am working on a site in ASP.net / VB within Dreamweaver MX2004.
The problem I am having is that I cannot find a way to not display a datafield within a dataset when it is empty. It seems Dreamweaver only gives you this option on datasets, not on members of the dataset.
To give a clear example of my problem; for example a user adds text to a page and has the option to upload an image aswell.
When he wouldn't upload an image a missing image link icon will be shown on the page <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> .
Can anyone help me out on this.
Thx,
Scott.
Replies
Replied 21 Jun 2004 12:46:46
21 Jun 2004 12:46:46 Simon Martin replied:
I've not looked at .net yet... so excuse my syntax
I've used this in old ASP to conditionally display the image
<% if rs_user("image" <> "" then %>
<img src = "rs_user("image"" />
<% else %>
<img src = "images/noimage.gif" /> (or nothing)
<% end if %>
HTH
Simon
I've used this in old ASP to conditionally display the image
<% if rs_user("image" <> "" then %>
<img src = "rs_user("image"" />
<% else %>
<img src = "images/noimage.gif" /> (or nothing)
<% end if %>
HTH
Simon