用下面的代码替换你的代码:
<td class="text2">
<%
if(contactInfo.isinservice==1){
%>
<img src="/image/stop.gif" width="15" height="15">
<%
}
%>
</td>
<td class="text2">
<%
if(contactInfo.isinservice==1){
%>
<img src="/image/stop.gif" width="15" height="15">
<%
}
%>
</td>
<%
if (contactInfo.isinservice==1){
%>
<img src="/image/stop.gif" width="15" height="15">
<%
}else{
%>
<%
}
%>
</td>
是不是这个意思?