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 ('