请高手帮忙看看,小弟我的新闻分了4类,当小弟我点其中一类下一页的时候,所有的分类新闻都显出来了

请高手帮忙看看,急!我的新闻分了4类,当我点其中一类下一页的时候,所有的分类新闻都显出来了

麻烦大家帮忙看看,当我点其中一类新闻上下页时,所有分类的新闻都显出来了,是怎回事

<% response.charset="utf-8" %>
<!--#include file="../Include/LanguageCh.asp" -->
<!--#include file="../Include/NoSqlHack.asp" -->
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<%
call SiteInfo()

SortID = Request.QueryString("SortID")

if SortID<>"" then
if not isInteger(SortID) then
ErrMessage = "没有指定操作参数!"
Writemsg(ErrMessage)
response.end
end if

set rs = server.createobject("adodb.recordset")
sql = "select ID,SortName"&Language&",Title"&Language&",Keywords"&Language&",Descriptions"&Language&" from YunXin_NewsSort where ViewFlag"&Language&" and ID="&SortID
rs.open sql,conn,1,1
if rs.eof and rs.bof then
ErrMessage = "参数传递错误!"
Writemsg(ErrMessage)
response.end
else
newssortname = rs("SortName"&Language)
if trim(rs("Title"&Language))<>"" then
webtitle = trim(rs("Title"&Language))
else
webtitle = newssortname
end if
if trim(rs("Keywords"&Language))<>"" then
seokeywords = trim(rs("Keywords"&Language))
else
seokeywords = newssortname
end if
if trim(rs("Descriptions"&Language))<>"" then
seodescriptions = trim(rs("Descriptions"&Language))
else
seodescriptions = newssortname
end if
end if
rs.close
set rs = nothing
else
webtitle = "新闻中心"
seokeywords = "新闻中心"
seodescriptions = "新闻中心"
end if
%>
<!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=utf-8" />
<meta name="copyright" content="Copyright 2004-2020 - YunXinCMS" />
<title>活动动态</title>
<meta name="Keywords" content="<% =seokeywords %>" />
<meta name="Description" content="<% =seodescriptions %>" />
<link href="Css/Style.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="background" style="position:absolute;z-index:-1;width:100%;height:100%;top:0px;left:0px;"></div>
<table width="1260"  height="800"  border="0" align="center" cellpadding="0" cellspacing="0" background="../images/aboutus/aboutbg.png">
  <tr>
    <td><!--#include file="contacthead.asp"--></td>
    
  </tr>
  <tr>
    <td ><img src="../images/hongdong.png" width="1260" height="419" /></td>
  </tr>
  <tr>
    <td><table width="1260" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="260" height="400" align="center" valign="top" ><!--#include file="Left2.asp"--></td>
    <td width="20"></td>
    <td height="1100" align="center" valign="top" class="barright">
    <table width="920" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:20px;">
      <tr>
        <td height="30" align="left" style="border-bottom:1px solid #0161B8;"><img src="Images/arrow02.gif" width="25" height="21" align="absmiddle" />您的当前位置:<a href="<% Call ChHomeUrl() %>">首页</a><%=WebLocation()%></td>
      </tr>
    </table>
      <table width="920" border="0" cellspacing="0" cellpadding="0">
        <%
set rs1 = server.createobject("adodb.recordset")
if SortID = "" then
sql = "select * from YunXin_News where ViewFlag"&Language&" order by ID desc"
else
SortPath = conn.execute("select * from YunXin_NewsSort where ViewFlag"&Language&" and ID="&SortID&"")("SortPath")
sql = "select * from YunXin_News where ViewFlag"&Language&" and Instr(SortPath,'"&SortPath&"')>0 order by ID desc"
end if
rs1.open sql,conn,1,1
'判断数据库中是否有数据信息
if rs1.eof and rs1.bof then
response.write "<tr><td width='730' align='center'><font color=""#FF0000"">暂无您要找的信息</font></td></tr>"
else
rs1.pagesize = 24
'判断页面参数传递是否正确
if not Isnumeric(request.querystring("page")) then
response.write "<tr><td width='730' align='center'><font color=""#FF0000"">页面参数传递错误</font></td></tr>"
else
page=clng(request.querystring("page"))
if page<1 then page=1
if page>rs1.pagecount then page=rs1.pagecount
rs1.AbsolutePage = page
for i=1 to rs1.pagesize
  %>
        <tr>
          <td height="30" align="left"  style="font-size:18px; border-bottom:1px dashed #cccccc;" ><img src="Images/Arrow_01.gif" width="9" height="4" align="absmiddle" />
            <%
  if rs1("PictureFlag") then 
response.write "<font color=""#e17504"">[图]</font><a href=""NewsView.asp?ID="&rs1("ID")&""">"&rs1("NewsName"&Language)&"</a>"
  else
response.write "<a href=""NewsView.asp?ID="&rs1("ID")&""">"&rs1("NewsName"&Language)&"</a>"
  end if
%></td>
          <td width="100" align="left" style="border-bottom:1px dashed #cccccc;"></td>
        </tr>
        <%
rs1.movenext
if rs1.eof then
exit For
end if
next
end if
'判断页面参数传递结束
  end if
  %>
      </table>
      <table width="920" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="40" align="center"><%
if page<=1 then
%>
            首页 上页
            <%else%>
            <a href="?page=1&amp;SortID=<%=ID%>">首页</a> <a href="?page=<%=page-1%>&amp;SortID=<%=ID%>">上页</a>
            <%end if%>
            第 <font color="#ff0000"><%=page%></font> 页
            <%if page>=rs1.pagecount then%>
            下页 尾页
            <%else%>
            <a href="?page=<%=page+1%>&amp;SortID=<%=ID%>">下页</a> <a href="?page=<%=rs1.pagecount%>&amp;SortID=<%=ID%>">尾页</a>
            <%end if%>
            共 <font color="#e17504"><%=rs1.pagecount%></font> 页(<font color="#e17504"> <%=rs1.pagesize%></font>条/页)
            <%
rs1.close
set rs1=nothing
%></td>
        </tr>
      </table></td>
  </tr>
</table></td>
  </tr>
</table>
</body>
</html>
<%
Function WebLocation()
    if SortID = "" then
WebLocation = " &gt; <a href='News.asp'>活动动态</a>"&vbCrLf
else
WebLocation = ""&vbCrLf
Dim rs, sql
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from YunXin_NewsSort Where ID="&SortID
rs.Open sql, conn, 1, 1
WebLocation = WebLocation&SortPathTXT("YunXin_NewsSort", rs("ID"))
rs.Close
Set rs = Nothing
end if
End Function

Function SortPathTXT(DataFrom, ID)
    Dim rs, sql
    Set rs = server.CreateObject("adodb.recordset")
    sql = "Select * From "&DataFrom&" where ID="&ID
    rs.Open sql, conn, 1, 1
    If Not rs.EOF Then
        'AutoLink = "/"&htmlmulu&"/"
        SortPathTXT = SortPathTXT(DataFrom, rs("ParentID"))&" &gt; <a href=""News.asp?SortID="&rs("ID")&""">"&rs("SortName"&Language)&"</a>"
End If
    rs.Close
    Set rs = Nothing
End Function
%>

------解决思路----------------------
 <a href="?page=<%=page+1%>&SortID=<%=SortID%>">下页</a> 
------解决思路----------------------
 <a href="?page=1&amp;SortID=<%=ID%>">首页</a> <a href="?page=<%=page-1%>&amp;SortID=<%=ID%>">上页</a>
            <%end if%>
            第 <font color="#ff0000"><%=page%></font> 页
            <%if page>=rs1.pagecount then%>
            下页 尾页
            <%else%>
            <a href="?page=<%=page+1%>&amp;SortID=<%=ID%>">下页</a> <a href="?page=<%=rs1.pagecount%>&amp;SortID=<%=ID%>">尾页</a>

你这里红色部分的变量名写错了吧,你上面SortID = Request.QueryString("SortID")
那应该红色部分是SortID吧