dongledell
Technical User
Hi,
I have my asp page running OK, now I am trying to refine it. What I would like to do is only include a certain table row if there is any information in the corresponding field in the recordset. I'd also like to format any text to ensure line breaks are included.
here's the code I was using:
<% if Not IsNull(scheme.Fields.Item("lendnote".Value) then %>
<tr>
<td width="200" valign="top"><b>Notes</b></td>
<td><%=replace(scheme.Fields.Item("lendnote".Value , vbCrLf , "<br>"%><br> </td>
</tr>
<%end if %>
only it does not work.
If the field scheme("lendnote" contains info, it simply puts nothing up, no row.
If the field scheme("lendnote" doesn't contains anything, it errors saying "invalid use of null"??!!
Ive tried various other methods but with no joy.
Any ideas?!
I have my asp page running OK, now I am trying to refine it. What I would like to do is only include a certain table row if there is any information in the corresponding field in the recordset. I'd also like to format any text to ensure line breaks are included.
here's the code I was using:
<% if Not IsNull(scheme.Fields.Item("lendnote".Value) then %>
<tr>
<td width="200" valign="top"><b>Notes</b></td>
<td><%=replace(scheme.Fields.Item("lendnote".Value , vbCrLf , "<br>"%><br> </td>
</tr>
<%end if %>
only it does not work.
If the field scheme("lendnote" contains info, it simply puts nothing up, no row.
If the field scheme("lendnote" doesn't contains anything, it errors saying "invalid use of null"??!!
Ive tried various other methods but with no joy.
Any ideas?!