ASP中框架分页问题!
ASP中框架分页问题,我做的是两个子框架,一个是HouYun(货运),一个是ShouHou(收货)
由于我将翻页的连接放在主窗体表格中('上一页','下一页'),
发现一个问题,这个'上一页','下一页'刷新不出来,
如果刷新主窗体,则两个子框架中记录信息会丢失,
如果不刷新,就出现上面的'上一页','下一页'刷新不出来,
我组长要我第一次打开主窗体时,不显示记录集,因为速度比较慢!点'显示资料'才显示在子框架中顯示(HouYun或ShouHou),
主窗体代码如下:(session('curpage')变量为HouYun(货运)的,session('curpage1')变量为ShouHou(收货),同样Session(TotalPages)和Session(TotalPages1)也是)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>货运管理</title>
<link href="mycss.css" rel="stylesheet" type="text/css">
</head>
<body>
<center><form name='form1' method="post" style="margin:0px" >
<%
'初始化当前页和总页数
if isempty(Session("CurPage")) then Session("CurPage")=1
if isempty(Session("TotalPages")) then Session("TotalPages")=1
if isempty(Session("CurPage1")) then Session("CurPage1")=1
if isempty(Session("TotalPages1")) then Session("TotalPages1")=1
%>
<table width="762" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="150" colspan="4" valign="top"><img src="harbourBW.jpg" width="760" height="150"></td>
</tr>
<tr>
<td width="158" height="1"></td>
<td colspan="3" rowspan="2" valign="top"><a href="shouhouchaxun.asp"><div align="right"> 收货部 </div></a></td>
</tr>
<tr>
<td height="17" valign="top"><div align="left"><a href="/NwAppWeb/default.asp">首页</a>><a href="/NwAppWeb/Freightage/index.asp">登录</a>>查询</div></td>
</tr>
<tr>
<td height="12" valign="top"></td>
<td width="400" valign="top"></td>
<td width="6"> </td>
<td width="198" rowspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="198" height="12" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="15" valign="top">今天收货>><a href="<%="shouhou.asp?curpage=" & Cint(Session("CurPage1"))%>" target="shouhou">显示资料</a></td>
</tr>
<tr>
<td height="245" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<!--DWLayoutTable-->
<tr>
<th width="129" height="20" align="center" valign="middle">公司名称</th>
<th width="66" valign="middle">部门</th>
</tr>
<tr bgcolor="#FFFFFF">
<td height="200" colspan="2" valign="top"><iframe width="100%" src=" frameborder="0" scrolling="no" name="shouhou"></iframe></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20" colspan="2" valign="top"><div align="left"><font color="#000000">
<% '分页'收货'
on error resume next
if Cint(Session("CurPage1")) > 1 then
Response.Write("<a href='shouhou.asp?curpage=" & Cint(Session("CurPage1")) - 1 & "'" target='shouhou'>上一页</a>")
End If
if CInt(Session("CurPage1")) <> CInt(Session("TotalPages1")) then
Response.Write("<a href='shouhou.asp?curpage=" & Cint(Session("CurPage1")) + 1 & "'" target='shouhou'>下一页</a>")
End If
Response.Write(" 第 <input type='text' name='curpage1' value='" & Session("CurPage1") & "' size=2 style='border:1px' disabled> 页,共 <input type='text' name='totalpages1' value='" & Session("TotalPages1") & "' size=2 style='border:1px' disabled>页")
%></font></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="15" colspan="2" valign="top">今天准备出车到深圳>><a href="<%="houyun.asp?curpage=" & Cint(Session("CurPage"))%>" target="houyun">显示资料</a></td>
<td> </td>
</tr>
<tr>
<th colspan="2" rowspan="2" valign="top"><table width="558" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<!--DWLayoutTable-->
<tr>
<td width="131" height="20" valign="top" bgcolor="#000000">货运编号</td>
<td width="170" valign="top" bgcolor="#000000">车别</td>
<td width="134" valign="top" bgcolor="#000000">开车时间</td>
<td width="118" valign="top" bgcolor="#000000">预计进口日期</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="200" colspan="4" valign="top"><iframe width="100%" src=" frameborder="0" scrolling="no" name="houyun"></iframe></td>
</tr>
<tr align="left" bgcolor="#FFFFFF">
<td height="21" colspan="4" valign="top" ><div align="left"><font color="#000000">
<%
'分页'货运'
if Cint(Session("CurPage")) > 1 then
Response.Write("<a href='houyun.asp?curpage=" & Cint(Session("CurPage")) - 1 & "'" target='houyun'>上一页</a>")
End If
if CInt(Session("CurPage")) <> CInt(Session("TotalPages")) then
Response.Write("<a href='houyun.asp?curpage=" & Cint(Session("CurPage")) + 1 & "'" target='houyun'>下一页</a>")
End If
Response.Write(" 第 <input type=text name='curpage' value='" & Session("CurPage") & "' size=2 style='border:1px' disabled>页,共 <input type=text name='totalpages' value='" & Session("TotalPages") & "' size=2 style='border:1px' disabled>页")
%></font></div>
</td>
</tr>
</table></th>
<td height="244"> </td>
</tr>
</table>
</form>
</center>
</body>
</html>

