I have a page that I need to use asp to check if a database field has data, if it has display one image if not display another.
There are 10 times I would need to do this, is there a better way of doing it than how I am doing it? I guess I am using too many resources and slowing the page down too.
There are 10 times I would need to do this, is there a better way of doing it than how I am doing it? I guess I am using too many resources and slowing the page down too.
Code:
<%
if rs("field1") <> "" then
response.write "<img src='image1.gif'>"
else
response.write "<img src='image2.gif'>"
end if
if rs("field2") <> "" then
response.write "<img src='image1.gif'>"
else
response.write "<img src='image2.gif'>"
end if
if rs("field3") <> "" then
response.write "<img src='image1.gif'>"
else
response.write "<img src='image2.gif'>"
end if
etc etc etc at the necessary points in the table.