I have a database that contains 3 plaque inscriptions in fields plaque, plaque2 and plaque3. I am trying to get my asp page to display only the plaques if there is data in the field. Some of the fields are null and some are just empty (no null value).
I have the following code, but I can't get it to work consistently:
This works if plaque3 is NULL but if I remove the NULL from the field, then nothing shows up. I've tried changing the And to OR and using IsEmpty insted of ="", but it only works when the fields are NULL.
I have the following code, but I can't get it to work consistently:
Code:
<div class="personalizedPlaques" style="width: 185px"> <p><%=rs("stock")%>Personalized <br />Engraved Plaque Ideas</p> <ul> <% if (NOT ISNULL (rs("plaque")) And (rs("plaque"))="") then %> <li class="goldPlate"><span><%=rs("Plaque")%></span> </li> <% end if %> <% if (NOT ISNULL (rs("plaque2")) And (rs("plaque2"))="") then %> <li class="goldPlate"><span><%=rs("Plaque2")%></span> </li> <% end if %> <% if (NOT ISNULL (rs("plaque3")) And (rs("plaque3"))="") then %> <li class="goldPlate"><span><%=rs("Plaque3")%></span> </li> <% end if %> </ul>
Comment