請各位大俠HELP,為什麼數值傳遞有問題?在線等待,來者有分
我做了一個信息檢索功能的ASP,主要功能是分面顯示檢索信息,這裡涉及到一個數據傳遞的問題,在處理上。我把一些數據放在不可見的控中,在傳遞後,數值為空,
源程式如下
<html>
<head>
<title>分頁顯示查詢結果</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<%
dim conn,connstr,s1
connstr="DBQ="+server.mappath("data.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
Set conn=Server.CreateObject("ADODB.CONNECTION")
conn.open connstr
set rs=Server.CreateObject("Adodb.Recordset")
dim sm,lb,cbs,jyr
sm=request.form("sm")
lb=request.form("lb")
cbs=request.form("cbs")
jyr=request.form("jyr")
s1="select id,sm,lb,cbs,jf,jyr from BOOK where ("
response.write"KK"
response.write lb
response.write cbs
response.write jyr
if sm<>"" then
s1=s1&"sm="&"'"&sm&"'"
flag=1
end if
if lb<>"0" and flag=1 then
s1=s1&" and lb="&"'"&lb&"'"
flag=1
elseif lb<>"0" then
s1=s1&"lb="&"'"&lb&"'"
flag=1
end if
if cbs<>"1" and flag=1 then
s1=s1&" and cbs="&"'"&cbs&"'"
flag=1
elseif cbs<>"1" then
s1=s1&"cbs="&"'"&cbs&"'"
flag=1
end if
if jyr<>"2" and flag=1 then
s1=s1&" and jyr="&"'"&jyr&"'"
flag=1
elseif jyr<>"2" then
s1=s1&"jyr="&"'"&jyr&"'"
flag=1
end if
s1=s1&")"
if sm="" and lb="0" and cbs="1" and jyr="2" then
s1="select id,sm,lb,cbs,jf,jyr from BOOK "
end if
response.write s1
rs.open s1,conn,1,3
if NOT rs.EOF then
rs.PageSize=5
rowcount=rs.PageSize
scrollaction=Request.Form("scrollaction")
if scrollaction<>"" then
pageno=Mid(scrollaction,2,1)
if pageno<1 then
pageno=1
end if
else
pageno=1
end if
rs.AbsolutePage= pageno
%>
<body bgcolor="#FFFFFF" background="img/back5.jpg">
<div align="center">
<p> </p>
<p> </p>
<p><font color="#0000FF" size="+5" face="標楷體"><b>查詢結果 </b></font></p>
<p> </p>
<p><font face="標楷體"><b><font color="#CC3333"> </font></b></font></p>
<form name="form1" >
</form>
<table bgcolor=#FFFFFF border=1 bordercolordark=#3366FF bordercolorlight=#CC3366
cellpadding=2 cellspacing=0 height=40 width=680 align="center" bordercolor="#CC3333">
<tr bgcolor="#FFFFFF" valign="middle" align="center">
<td width=60 height="14">序號</td>
<td width=137 height="14">書名</td>
<td width=113 height="14">類別</td>
<td width=133 height="14">出版社</td>
<td width=81 height="14">借否</td>
<td colspan=16 width=118 height="14">借用人</td>
</tr>
<%
rs.movefirst
rowcount=rs.PageSize
do while NOT rs.eof and rowcount>0
%>
<tr>
<% for i=0 to 5%>
<td align=center width=60 height="20"><% =rs(i) %></td>
<%next%>
</tr>
<%
rowcount=rowcount-1
rs.movenext
loop
%>
</table>
<font face="標楷體"><b><font color="#CC3333">請選擇查看詳細信息序號</font></b></font> <font face="標楷體"><b><font color="#CC3333">
<select name="menu1" >
<option selected>請選擇</option>
<%
rs.movefirst
rs.AbsolutePage=pageno
rowcount=rs.pagesize
do while not rs.eof and rowcount>0
%>
<option><%=rs("id")%></option>
<%
rs.movenext
rowcount=rowcount-1
loop
%>
</select>
</font></b></font><font face="標楷體"><b><font color="#CC3333">
<input type="submit" name="b1" value="查看">
</font></b></font><br>
<form method=post action="view.asp">
<input type="hidden" name "lb" value="<%=lb%>"> 《問題是傳不過去,為空》
<input type="hidden" name "cbs" value="<%=cbs%>">
<input type="hidden" name "jyr" value="<%=jyr%>">
<input type="hidden" name "sm" value="<%=sm%>">
就這這幾個數據,傳到下頁為空,我看了一天了,不知怎麼辦
<% if pageno>1 then %>
<p align="center">
<input type="submit" name="scrollaction" value="<%="第"&pageno-1&"頁"%>"style="color:#0000000; font_size:12pt;">
<%end if %> <%if rowcount=0 then %>
<input type="submit" name="scrollaction" value="<%="第"&pageno+1&"頁"%>"style="color:#0000000; font_size:12pt;">
<font color="#333399"><%end if%> <font face="標楷體"><b><font size="+1">返回</font></b></font></font>
</form>
</div>
<%else%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width ="15%"></td>
<td width ="67%">
<p align="center"></p>
<p align="center"><font size="+4" color="#CC3333">對不起,您查找的記錄不存在 !</font></p>
</td>
<td width="18%"></td>
</tr>
</table>
<% end if%>
<%
response.write"KqwqwqwK"
response.write lb
response.write cbs
response.write jyr
%>
<%set conn=nothing
set rs=nothing %>
</body>
</html>
請給點提示,