帮我看看这段ASP哪里出问题了
点击下一页就出现 参数TypeID后面不能有非法字符!
代码如下
<!--#include file="Include/Startup.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 content="text/html; charset=gb2312" http-equiv="content-type" />
<title>图文信息列表</title>
<link href="Include/ManageStyle.css" rel="stylesheet" type="text/css" />
<%
Identification()
'传入参数
Dim ClassName, cPage, cUrl, tTypeID, cType, wSql
Dim sID, sTitle, sNum
ClassName = SafeRequest("Action",0)
tTypeID = SafeRequest("TypeID",1)
If tTypeID <> "" Then
cType = "?TypeID=" & cType
wSql = "n.nType = "& tTypeID &" AND"
End If
cPage = SafeRequest("Page",1)
If cPage = "" Then
cUrl = "Simple.Asp" & cType
Else
If cType <> "" Then
cUrl = "Simple.Asp"& cType &"&Page=" & cPage
Else
cUrl = "Simple.Asp?Page=" & cPage
End If
End If
Select case ClassName
case "cTop"
cInfocTop
case "Del"
cInfoDel
case "GoPage"
Response.Redirect("Simple.Asp?Page=" & Request.Form("PageKey"))
End Select
%>
</head>
<body>
<%
Dim cSql, cRs, tType
Set cRs = Server.CreateObject("ADODB.Recordset")
cSql = "SELECT nTitle FROM y_NewsType WHERE nID=" & tTypeID
cRs.Open cSql, Conn, 0, 1
If Not cRs.EOF Then
tType = cRs(0)
Else
GoMain "栏目不存在!","Type.Asp"
End If
cRs.Close
Set cRs = Nothing
%>
<p class="pTitle">
<%=tType %>:<a href="SimpleEdit.Asp<%If tTypeID <> "" Then Response.Write( "?TypeID=" & tTypeID ) End If %>">发布新信息</a></p>
<div class="Info_Title">
<label class="Porduct_li_1">
所属分类</label><label class="Porduct_li_2">信息标题</label><label>管理操作</label></div>
<ul class="Info_List">
<%
Dim PageUrl, Pages, Page, PageSize
Sql = "SELECT nt.nTitle,n.nID,n.nTitle,n.nTop FROM y_News as n,y_NewsType as nt WHERE "& wSql &" n.nType = nt.nID AND nt.nCategory = 1 ORDER BY n.nID DESC"
RS.Open Sql,Conn, 3, 1, 1
PageUrl = "Simple.Asp" & cType
Rs.PageSize = 13
Pages = Rs.PageCount
Page = cPage
If page = "" or page=<1 Then
Page = 1
ElseIf cint(Page)>=cint(Pages) Then
Page = Pages
End If
Dim cx
cx = Rs.RecordCount
If Not Rs.Eof Then
Dim cs
If Pages > 1 Then
If cx - (Rs.PageSize * Page) < 0 Then
cs = cx - Rs.PageSize * Page + Rs.PageSize
Else
cs = Rs.PageSize
End If
Else
cs = Rs.RecordCount
End If
Dim nn
nn = (page-1)*Rs.PageSize
Rs.move nn
For I = 1 To Rs.PageSize
If cs = I Then
Response.Write(" <li style=""border-bottom: none;"">")
Else
Response.Write(" <li>")
End If
%>
<label class="Porduct_li_1"><span><%=Rs(0) %></span></label><label class="Porduct_li_2">
<a href="SimpleEdit.Asp?TypeID=<%=tTypeID %>&Action=Edit&ID=<%=Rs(1) %>" title="修改该信息"><%=Rs(2) %></a></label>
<label class="Porduct_li_3"><a href="Simple.Asp?TypeID=<%=tTypeID %>&Action=cTop&us=<%If Rs(3) = True Then Response.Write("No") Else Response.Write("Yes") End If%>&ID=<%=Rs(1) %>"><%If Rs(3) = True Then Response.Write("撤消") Else Response.Write("推荐") End If%></a> / <a href="Simple.Asp?TypeID=<%=tTypeID %>&Action=Del&ID=<%=Rs(1) %>"
onclick="javascript:return confirm('是否确定删除?')" title="删除该信息"><strong style="color: #ff0000;">×</strong></a>
</label></li>
<%
RS.MoveNext
If Rs.Eof Then
Exit For
End If
Next
Else
Response.Write "<li style=""border-bottom: none; text-align: center;"">数据库中没有相关数据!</li>"
Page = 0
End If
Rs.Close
%>
</ul>
<%=PageCute(cx,Page,Pages,PageUrl)%>
</body>
</html>
<%
'推荐
Sub cInfocTop
Dim us, ks, sType
us = SafeRequest("us",0)
sID = SafeRequest("ID",1)
sType = SafeRequest("TypeID",1)
If us = "Yes" Then
ks = True
Else
ks = False
End If
Conn.Execute("UPDATE y_News SET nTop="& ks &" WHERE nID=" & sID)
Response.Redirect("Simple.Asp?TypeID=" & sType)
End Sub
'删除
Sub cInfoDel
Dim sType
sID = SafeRequest("ID",1)
sType = SafeRequest("TypeID",1)
Conn.Execute("DELETE FROM y_News WHERE nID = "& sID &"")
GoMain "该产品已成功被删除!\n\n点击[确定]进行下一步操作!","Simple.Asp?TypeID=" & sType
End Sub
DBConnEnd()
%>
[解决办法]
你看一下你下一页的链接url是什么呗
[解决办法]
下一页的链接是哪个
[解决办法]