|
发表于 2010-4-16 20:04:37
|
显示全部楼层
页面一,index.html
你这个页面里面应该有1个对应数据库里面的记录,比如有以下记录
id 部门附件字段1,部门附件字段2,部门1,部门2
<a href="Result.asp?id=1&type=营业部">营业部</a>
<a href="Result.asp?id=1&type=信息部">信息部</a>代码
这里的id需要根据你的实际情况进行更改,有可能你是通过一个循环取得的.每条记录需要对应一个ID,这个ID用来确定记录的具体位置
页面2,结果页面,Result.asp- <%
- dim t,id
- t=Request("type")
- id=Request("id")
- if t<>"营业部" then t="信息部"
- dim sql,rs
- set rs=Server.CreateObject("Adodb.RecordSet")
- set rs=conn.execute("select id,部门附件字段1,部门附件字段2,部门1,部门2 from 表1 where id= "&id)
- if not rs.eof then
- if rs("部门1")=t then response.Redirect rs("部门附件字段1")
- if rs("部门2")=t then response.Redirect rs("部门附件字段2")
- else
- response.write "没有记录"
- end if
- rs.close:set rs=nothing
- %>
复制代码 具体的还需要细化,你一点代码都没有贴出来,那就比较麻烦的 |
|