未来之星五金机电分店:求助 asp的问题

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/05 17:42:48
如果数据库中存在图片<%=rs("picture")%> 就以400*300显示出来,没有就拉倒。 这句话用ASP怎么表达 ? 谢谢

<%
if rs("picture")<>null
response.writr(rs("picture"))
end if
%>

<%if rs("picture")<>empty then%>
<img src="<%=rs("picture")%>" width=400 height=300>
<%else
response.write ("数据库中没有图片")
end if %>

最简单的方法
if rs(\"picture\")<>\"\" then response.writr(rs(\"picture\"))