asp分类显示问题?

来源:百度知道 编辑:UC知道 时间:2024/07/05 01:39:53
我需要做这样的一个效果,首先页面要全部显示出里面的所有大类,再根据点击大类传递后的值在该类下面显示出该大类里面的小类,现在的问题是我点击大类,为什么该大类里面的小类均会在出现在所有的大类下面,百思不得其解,下面是代码,寻求高手解答。
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>

<%set rs=server.CreateObject("adodb.recordset")
sql="select * from under where under=0"
rs.open sql,con

<%

dim bigclass'手里没asp环境未测试 有问题hi我
bigclass=request.QueryString("bigclass")
sub ListBigClass()
set rs=server.CreateObject("adodb.recordset")
sql="select * from under where under=0"
rs.open sql,conn,1,1
do while not rs.eof
response.Write "<a href=?bigclass="&rs("id")&" >"&rs("content")&"</a></br>"
rs.movenext
loop
rs.close:set rs=nothing
end sub

function ListSmallClass(bigclassValue)
set rs2=server.CreateObject("adodb.recordset")
sql2="select * from under where under="&bigclassValue
rs2.open sql2,conn,1,1
do while not rs2.eof
ListSmallClass=ListSmallClass&rs2("content")&"</br>"
rs2.movenext
loop
rs2.close:set rs2=nothing
end function

if bigclass="" then
call Lis