最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一个分页控件
时间:2022-07-02 11:55:06 编辑:袖梨 来源:一聚教程网
pager.ascx
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="pager.ascx.cs" Inherits="Web.pagercontrol" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
var currentpage=<%=pageindex%>;//当前第几页
var p=<%=pageindex%>-1;
var sum=<%=sum%>;
var perpage=<%=perpage%>;
var urlstr='<%=urlstr%>';
var fontcolor='<%=fontcolor%>';
//n代表一共有多少页
if(sum%perpage==0)
{
n=sum/perpage;
}
else
{
n=(sum-sum%perpage)/perpage+1;
}
document.write ('');
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="pager.ascx.cs" Inherits="Web.pagercontrol" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
var currentpage=<%=pageindex%>;//当前第几页
var p=<%=pageindex%>-1;
var sum=<%=sum%>;
var perpage=<%=perpage%>;
var urlstr='<%=urlstr%>';
var fontcolor='<%=fontcolor%>';
//n代表一共有多少页
if(sum%perpage==0)
{
n=sum/perpage;
}
else
{
n=(sum-sum%perpage)/perpage+1;
}
document.write ('