kgdipbyve 发表于 2008-7-28 16:32

搜索成功后的一个问题

_________________                    ________
|_______________|  ⊙ 新闻   ○ 产品 |_搜索_|
  这里搜索成功后,会跳转新闻或产品的页面去应该怎么做?


<!--#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
%>

octillion 发表于 2008-7-28 16:39

Response.Redirect theUrl

页: [1]

编程论坛