Forums
This topic is locked
Conditional Region
Posted 08 Jan 2003 23:52:28
1
has voted
08 Jan 2003 23:52:28 Edgardo Jimenez posted:
Hi,I want to put some text on a page, but it must only appear if a field on the
record is empty (= 0). Dreamweaver only supports the conditional region if
the whole recordset is empty. Is there any code or extension I could use?
Thanks,
E.J.
Replies
Replied 09 Jan 2003 00:52:45
09 Jan 2003 00:52:45 asp asp replied:
yes you can, just filter your recorset to look for what ever field you want to check against and then use this.
If (RStest.Fields.Item("category".Value) <> "" Then%>
<%=Replace(RStest.Fields.Item("category".Value,chr(13),"<br>"%>
<% Else
Response.Write ("NOTHING THERE"
End If %>
If (RStest.Fields.Item("category".Value) <> "" Then%>
<%=Replace(RStest.Fields.Item("category".Value,chr(13),"<br>"%>
<% Else
Response.Write ("NOTHING THERE"
End If %>
Replied 09 Jan 2003 14:36:12
09 Jan 2003 14:36:12 Edgardo Jimenez replied:
Thanks a lot, it worked
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
yes you can, just filter your recorset to look for what ever field you want to check against and then use this.
If (RStest.Fields.Item("category".Value) <> "" Then%>
<%=Replace(RStest.Fields.Item("category".Value,chr(13),"<br>"%>
<% Else
Response.Write ("NOTHING THERE"
End If %>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
yes you can, just filter your recorset to look for what ever field you want to check against and then use this.
If (RStest.Fields.Item("category".Value) <> "" Then%>
<%=Replace(RStest.Fields.Item("category".Value,chr(13),"<br>"%>
<% Else
Response.Write ("NOTHING THERE"
End If %>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 09 Jan 2003 20:42:27
09 Jan 2003 20:42:27 asp asp replied:
your welcome.