Paging
Copy Code code as follows:
<script type= "Text/javascript" language= "JavaScript" src= "Js/pager.js" ></script>
Copy Code code as follows:
* *--------Pager-------* *
. number span a{padding:4px 6px;}
. number span a:hover{padding:4px 6px; background-color: #999; color: #FFFFFF;}
. number {margin:5px 0;font-size:14px;font-weight:bold;color: #ff00ff;}
. number Span{border:solid 1px #cccccc; background-color: #FFFFFF; color: #666666; Line-height:20px;display: inline-block;margin-left:4px;margin-right:4px;}
#a_title {text-align:center; height:30px; line-height:30px;font-size:18px; font-weight:bolder; Display:block}
#a_smalltitle {font-size:14px; font-weight:bolder; text-align:center;display:block;}
A_about{text-align:center display:block; height:20px line-height:20px; background: #F3F8F7}
#a_content {padding:10px; height:auto;overflow:hidden;text-align:left;line-height:200%; word-break:break-all;}
#a_near {padding-left:20px; margin:5px 0; Height:auto}
. red{color:red}
<p class= "NAV" >
<!--JS paging-->
<script type= "Text/javascript" language= "JavaScript" >
var pg = new Showpages (' PG ');
Pg.pagecount = <% =pagecount%>;
Pg.printhtml ();
</script>
</p>
</div>
public void Bind ()
{
Maticsoft.BLL.news bllnews = new Maticsoft.BLL.news ();
PagedDataSource PS = new PagedDataSource ();
Ps. DataSource = Bllnews. Getalllist (). Tables[0]. DefaultView;
Ps. AllowPaging = true;
Ps. PageSize = 5;//Paging size
Ps. CurrentPageIndex = currentPage-1;
PageCount = PS. Pagecount.tostring ();
R1. DataSource = PS;
R1. DataBind ();
}