repeater+aspnetpager 组合分页
页面代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TF_Product.aspx.cs" Inherits="TF_Product" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>通服产品</title>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{
//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked
$("#firstpane p.menu_head").click(function()
{
$(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
$(this).siblings().css({backgroundImage:"url(left.png)"});
});
});
</script>
<style type="text/css">
.menu_list { width: 229px; font-size:13px; }
.menu_head { padding: 8px 60px; cursor: pointer; position: relative; margin:1px; height:16px; background: #DFEDFA url(left.png) center right no-repeat; }
.menu_body { display:none;}
.menu_body a { display:block; color:#006699; background-color:#EFEFEF; padding-left:60px; padding-top:8px; padding-bottom:3px; text-decoration:none; }
.menu_body a:hover { color: #000000; text-decoration:underline; }
</style>
<meta name="keywords" content="通服科技">
<meta name="description" content="江西通服科技有限公司">
<link href="./Index_files/style.css" type="text/css" rel="stylesheet">
<script src="js/AC_RunActiveContent.js" type="text/javascript"></script>
<!--焦点图-->
<style type="text/css">
.anpager{background:#DFEDFA none repeat scroll 0 0;border:1px solid #CCCCCC;color:#FFFFFF;padding:4px 5px 4px 5px;}
.container, .container *{margin:0; padding:0;} .container{width:886px; height:267px; overflow:hidden;position:relative;} .slider{position:absolute;}
.slider li{ list-style:none;display:inline;}
.slider img{ width:886px; height:267px; display:block;} .num{ position:absolute; right:5px; bottom:5px;}
.num li{
float: left;
color: #FF7300;
text-align: center;
line-height: 16px;
width: 16px;
height: 16px;
font-family: Arial;
font-size: 12px;
cursor: pointer;
overflow: hidden;
margin: 3px 1px;
border: 1px solid #FF7300;
background-color: #fff;
}
.num li.on{
color: #fff;
line-height: 21px;
width: 21px;
height: 21px;
font-size: 16px;
margin: 0 1px;
border: 0;
background-color: #FF7300;
font-weight: bold;
}
</style>
<!--焦点图-->
</head>
<body>
<form runat="server">
<!--头部-->
<table width="878" height="114" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tbody>
<tr>
<td height="77">
<table width="878px" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr><td width="73%" height="53" rowspan="2" align="left"><img src="./Index_files/LOGO_SY180-60.png" width="178" height="60" border="0"></td>
<td width="27%" align="right" valign="top">
【登陆】【注册】
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td width="878" align="center" style=" border-bottom:1px solid blue;" ><div style="width:100px; float:left;"></div>
<div id="nav" align="center">
<a href="Default.aspx" target="_self" style="color:Black;">首页 |</a></div> <div id="nav" align="center">
<a href="TF_RecList.aspx" target="_self" style="color:Black;">新闻中心 |</a></div> <div id="nav" align="center">
<a href="TF_Product.aspx" target="_self" style="color:Black;">通服产品 |</a></div> <div id="nav" align="center">
<a href="TF_Objects.aspx" target="_self" style="color:Black;">公司业绩 |</a></div> <div id="nav" align="center">
<a href="TF_Servers.aspx" target="_self" style="color:Black;">服务中心 |</a></div> <div id="nav" align="center">
<a href="TF_Solution.aspx" target="_self" style="color:Black;">解决方案 |</a></div> <div id="nav" align="center">
<a href="AboutUs.aspx" target="_self" style="color:Black;">关于我们 |</a></div>
</td>
</tr>
<tr>
<td align="center" width="878px">
<div class="container" id="idTransformView">
<ul class="slider" id="idSlider">
<li><img src="data:images/01.jpg"/></li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
<!--中间-->
<table width="890" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tbody>
<tr>
<td>
<div style="border:1px solid #DFEDFA; height:26px; padding-top:5px; padding-left:1%">
<table width="100%">
<tr>
<td>首页 > 通服产品</td>
<td> </td><td> </td>
<td align="right"><a href="Default.aspx">返回首页</a></td>
</tr>
</table>
</div>
</td>
</tr>
</tbody>
</table>
<table width="890" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
<tbody>
<tr>
<td width="229" valign="top">
<div>
<img src="img/20140305165205.jpg" width="229px" />
</div>
<div id="firstpane" class="menu_list">
<!--Code for menu starts here-->
<p class="menu_head">基建产品</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=45">普通基建</a><a href="TF_Product.aspx?id=46">美化基建</a>
</div>
<p class="menu_head">无源器件</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=5">天线</a> <a href="TF_Product.aspx?id=14">负载</a>
<a href="TF_Product.aspx?id=11">功分器</a> <a href="TF_Product.aspx?id=17">合路器</a>
<a href="TF_Product.aspx?id=47">耦合器</a> <a href="TF_Product.aspx?id=56">双工器</a>
<a href="TF_Product.aspx?id=70">AC安装配件</a> <a href="TF_Product.aspx?id=89">屏蔽器</a>
</div>
<p class="menu_head">防雷产品</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=10">避雷器</a> <a href="TF_Product.aspx?id=57">防雷箱</a>
</div>
<p class="menu_head">电源产品</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=12">开关电源</a> <a href="TF_Product.aspx?id=23">USP电源</a>
<a href="TF_Product.aspx?id=61">远供电源</a> <a href="TF_Product.aspx?id=81">电源配套</a>
</div>
<p class="menu_head">IP通讯类产品</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=27">IP网络产品</a> <a href="TF_Product.aspx?id=29">IP无线产品</a>
<a href="TF_Product.aspx?id=30">IP安全产品</a> <a href="TF_Product.aspx?id=31">IP存储及服务器</a>
<a href="TF_Product.aspx?id=32">IP多媒体产品</a> <a href="TF_Product.aspx?id=33">IP管理产品</a>
<a href="TF_Product.aspx?id=71">H3C产品</a> <a href="TF_Product.aspx?id=72">迈普产品</a>
<a href="TF_Product.aspx?id=73">迪普产品</a>
</div>
<p class="menu_head">工程辅材</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=6">射频组件</a> <a href="TF_Product.aspx?id=7">电缆组件</a>
<a href="TF_Product.aspx?id=8">光纤组件</a> <a href="TF_Product.aspx?id=9">五类缆组件</a>
<a href="TF_Product.aspx?id=18">接地线</a> <a href="TF_Product.aspx?id=62">辅材包</a>
<a href="TF_Product.aspx?id=82">套管</a> <a href="TF_Product.aspx?id=83">紧固件</a>
</div>
<p class="menu_head">连接器</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=15">射频连接器</a> <a href="TF_Product.aspx?id=16">光纤连接器</a>
<a href="TF_Product.aspx?id=63">转换头</a>
</div>
<p class="menu_head">服务类</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=58">工程建设类</a> <a href="TF_Product.aspx?id=59">工程维护类</a>
<a href="TF_Product.aspx?id=60">软件类</a>
</div>
<p class="menu_head">品牌分销</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=87">华为产品</a>
</div>
<p class="menu_head">配件类</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=67">配件类</a> <a href="TF_Product.aspx?id=86">标准件</a>
</div>
<p class="menu_head">其他</p>
<div class="menu_body">
<a href="TF_Product.aspx?id=66">邮费差额</a> <a href="TF_Product.aspx?id=69">工程类服务费用</a>
<a href="TF_Product.aspx?id=78">折扣</a> <a href="TF_Product.aspx?id=88">设备</a>
</div>
</div>
</td>
<td width="660" valign="top">
<div style="border-bottom:1px solid #DFEDFA; padding-left:2%; margin-left:2%;">
产品类别:<asp:DropDownList ID="ddlProductType" runat="server" DataTextField="pt_name" DataValueField="pt_id">
</asp:DropDownList>
关键字:<asp:TextBox ID="txtGJZ" runat="server"></asp:TextBox>
<asp:Button ID="btnSel" runat="server" Text="搜索" onclick="btnSel_Click" />
</div>
<div> </div>
<div>
<asp:Repeater ID="rp" runat="server">
<ItemTemplate>
<div style="margin-left:2%; border:1px solid #DFEDFA; padding:3px; margin-top:2px; margin-bottom:3px;">
<table width="100%">
<tr height="24px">
<td rowspan="4" width="90px">
<asp:Image ID="Image1" ImageUrl="~/Product_pic/NoPic.jpg" runat="server" Width="90px" Height="90px" />
</td>
<td width="9px"> </td>
<td width="60px">产品型号:</td>
<td><span style="float:left"><%#Eval("pr_guige")%></span><span style="float:right;"><a href="#">查看详情</a></span></td>
</tr>
<tr height="24px">
<td width="9px"> </td>
<td>产品编码:</td>
<td><%#Eval("pr_bianma")%></td>
</tr>
<tr height="30px">
<td width="9px"> </td>
<td>产品描述:</td>
<td><%#Eval("pr_ms")%></td>
</tr>
<tr><td height="8px"> </td></tr>
</table>
</div>
</ItemTemplate>
</asp:Repeater>
<div style="height:22px; margin-left:2%;" align="right">
<webdiyer:AspNetPager ID="AspNetPager1" CssClass="anpager" runat="server" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"
onpagechanged="AspNetPager1_PageChanged" PageSize="6" ShowMoreButtons="False" ShowPageIndexBox="Never">
</webdiyer:AspNetPager>
</div>
</div> </td>
</tr>
</tbody>
</table>
<!--版权声明-->
<table width="878" border="0" align="center">
<tbody>
<tr>
<td>
<img src="./Index_files/foot_02.gif" usemap="#foot" width="878">
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html> 后台代码:
Tb_productsHelper helper = new Tb_productsHelper();
IList<Tb_productsInfo> list = helper.GetAllListBySql(product_sql);
this.AspNetPager1.RecordCount = list.Count;//绑定总数量
this.AspNetPager1.AlwaysShow = true;
//先声明一个分页类对象
PagedDataSource ps = new PagedDataSource();
ps.AllowPaging = true;
ps.PageSize = this.AspNetPager1.PageSize;
ps.CurrentPageIndex = this.AspNetPager1.CurrentPageIndex-;
ps.DataSource = list;
this.rp.DataSource = ps;
this.rp.DataBind();
repeater+aspnetpager 组合分页的更多相关文章
- Repeater+AspNetPager+Ajax留言板
最近想要巩固下基础知识,于是写了一个比较简单易懂实用的留言板. 部分样式参考了CSDN(貌似最近一直很火),部分源码参照了Alexis. 主要结构: 1.前期准备 2.Repeater+AspNetP ...
- AspNetPager 免费分页控件7.5.1版发布!
AspNetPager 免费分页控件7.5.1版发布,本次升级主要内容有: 修正了ShowDisabledButtons为false时html闭合标签丢失的bug:改为从System.Web.UI.W ...
- Repeater 无刷新分页
原文:http://blog.csdn.net/Sandy945/archive/2009/05/22/4208998.aspx 本文讲述的是如何利用 XMLHttpRequest 来对 Repeat ...
- 使用AspNetPager进行分页,查询条件丢失问题
在Asp.Net中使用AspNetPager进行分页时,发现一个问题: 当通过查询条件进行查询后,对查询结果进行翻页操作时,查询条件会丢失. 当修改UrlPaging属性后(设置UrlPaging=“ ...
- aspnetpager+repeater+oracle实现分页功能
一.设计原理阐述 数据查询分页,这个功能相信大家都很熟悉,通过数据库或其它数据源进行查询操作后,将获得的数据显示到界面上,但是由于数据量太大,不能一次性完全的显示出来,就有了数据分页的需求.这个需求在 ...
- Repeater绑定数据库,使用AspNetPager进行分页
分页是Web中经常遇到的功能,分页主要有真分页和假分页. 所谓真分页是指:每一页显示多少数据,就从数据库读多少数据: 假分页是指:一次性从数据库读取所有数据,然后再进行分页. 这两种分页方式区别在于从 ...
- .NET中的repeater简介及分页效果
Repeater控件是一个数据绑定容器控件,它能够生成各个项的列表,并可以使用模板定义网页上各个项的布局.当该页运行时,该控件为数据源中的每个项重复此布局. 配合模板使用repeater控件 若要使 ...
- ASP.NET Repeater 控件分页
protected void Page_Load(object sender, EventArgs e) { HttpContext context = HttpContext.Current; co ...
- 千万数量级分页存储过程 +AspNetPager现实分页
存储过程 USE [ForeignTradeDB] GO /****** Object: StoredProcedure [dbo].[CommonGetDataPager] Script Date: ...
随机推荐
- 使用XV-11激光雷达做hector_slam
大家在学习ROS中不可避免需要使用激光雷达,高精地图.实时定位以及障碍物检测等多项技术,而这些技术都离不开光学雷达的支持,但是呢雷达这真是太贵了,大部分人是负担不起(实验室.研究所土豪可以略过),但是 ...
- Navicat for MySQL使用手记(下)--实现自动备份数据库
五.备份和还原MySQL数据库 在数据库的管理中,备份和还原是必须做认真做的事情,如果疏忽或者做粗糙了,那么一旦数据库故障后果不堪设想,所以Navicat同样也有备份和还原的功能,相比较创建功能,其备 ...
- 使用YCSB测试mongodb
项目里面需要对mongodb的性能进行测试,看了下网上很多做法都是使用YCSB进行测试,因此开始学习使用YCSB. 参考资料: YCSB github地址:https://github.com/bri ...
- zufeoj 花生(The Peanuts)
花生(The Peanuts) 时间限制: 1 Sec 内存限制: 128 MB提交: 3 解决: 2[提交][状态][讨论版] 题目描述 鲁宾逊先生和他的宠物猴,多多,非常喜欢花生.有一天,他们 ...
- Java开发需要注意的流程
将一些需要变动的配置写在属性文件中 比如,没有把一些需要并发执行时使用的线程数设置成可在属性文件中配置.那么你的程序无论在DEV环境中,还是TEST环境中,都可以顺畅无阻地运行,但是一旦部署在PROD ...
- netty实现远程调用RPC功能
netty实现远程调用RPC功能 依赖 服务端功能模块编写 客户端功能模块编写 netty实现远程调用RPC功能 PRC的功能一句话说白了,就是远程调用其他电脑的api 依赖 <dependen ...
- 摄影之HDR
摄影之HDR 高动态范围图像(High-Dynamic Range,简称HDR),相比普通的图像,可以提供更多的动态范围和图像细节,根据不同的曝光时间的LDR(Low-Dynamic Range)图像 ...
- Hadoop IO 特性详解(2)
(本文引用了microheart,ggjucheng的一些资料,在此感谢.charles觉得知识无价,开源共享无价) 这一次我们接着分析文件IO校验的相关代码,看看最底层是如何实现这种大数据集的文件校 ...
- linux下配置tomcat开机自启动
Linux下配置tomcat开机自启动 1.写一个tomcat脚本,内容如下,设置其权限为755,放在/etc/init.d/目录下 #!/bin/bash## /etc/init.d/tomca ...
- jquery on事件在IE8下失效的一种情况,及解决方法/bootstrap空间绑定控件事件不好用
同事在复制bootstrap中的select控件之后,发现用$('.selectpicker').selectpicker();刷新下拉框控件不好使,后来发现是用原生js克隆的方法obj.cloneN ...