注册 登录
编程论坛 ASP技术论坛

搜索成功后的一个问题

kgdipbyve 发布于 2008-07-28 16:32, 635 次点击
_________________                    ________
|_______________|  ⊙ 新闻   ○ 产品 |_搜索_|
  这里搜索成功后,会跳转新闻或产品的页面去应该怎么做?


<!--#include file="inc/conn.asp"-->
<%
set rsb=server.CreateObject("adodb.recordset")
if request("title")="anlie" then
sqlb="select * from Products where title='"&request.form("title1")&"'"
else
sqlb="select * from news where title='"&request.form("title1")&"'"
end if
rsb.open sqlb,conn,1,1
if rsb.eof then
Response.Write"<script>alert('对不起,没有相关资料');window.location='index.asp'</script>"
response.End()
else
while not rsb.eof
%>

<table width="982" height="65" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><%=rsb("contnet")%></td>
    <td></td>
  </tr>
</table>
<%
rsb.movenext
wend
end if
rsb.close
set rsb=nothing
%>
1 回复
#2
octillion2008-07-28 16:39
Response.Redirect theUrl
1