%
dim id,title,content,searchKey
searchKey=trim(request("searchKey"))
if searchKey<>"" then
set rs=conn.execute("select * from products where name like '%"&searchKey&"%'")
else
if trim(request("id"))<>"" then
if isnumeric(trim(request("id")))then
id=cint(trim(request("id")))
else
id=9
end if
else
id=9
end if
set rs=conn.execute("select * from products where id="&id)
end if
if not rs.eof then
title=rs("name")
content=rs("content")
else
title="No Product"
content="No Product"
end if
rs.close
set rs=nothing
%>