mangeloni
12-28-2002, 02:14 AM
I know that to hide empty data fields and the <TR> that contains them you must do...
<% if (rsName.Fields.Item("extension").Value != null) { %>
<TR>
<TD>Extension</TD>
<TD><%=(rsName.Fields.Item("extension").Value)%></TD>
</TR>
<% } %>
However, I am not getting the data from a Record Set but from a Session Variable - is there a way to modify the above code to accomodate this or is there other code altogether?
I have tried the following but I get a " 'Null' is undefined " error
<% if (Session("Session1").Value != Null) { %>
<tr>
<td><%= Session("Session1") %></td>
<td width="20"> </td>
<td> <%= Session("Session2") %></td>
</tr>
<% } %>
Any help would be greatly appreciated.
-MAngeloni
<% if (rsName.Fields.Item("extension").Value != null) { %>
<TR>
<TD>Extension</TD>
<TD><%=(rsName.Fields.Item("extension").Value)%></TD>
</TR>
<% } %>
However, I am not getting the data from a Record Set but from a Session Variable - is there a way to modify the above code to accomodate this or is there other code altogether?
I have tried the following but I get a " 'Null' is undefined " error
<% if (Session("Session1").Value != Null) { %>
<tr>
<td><%= Session("Session1") %></td>
<td width="20"> </td>
<td> <%= Session("Session2") %></td>
</tr>
<% } %>
Any help would be greatly appreciated.
-MAngeloni