ASP.NET2.0分页技术之使用纯sql语句的双top分页篇
Repeater在前台使用比较灵活自由,但有一个问题就是Repeater不支持直接分页,这个很多人看起来就有点不想用了,但我想大家都知道GridView控件或DataGrid控件在启用自带分页的时候其实效率是非常低的,大的不说,一但到了百万级数据以后,就会感觉是多么的痛苦和无耐了,所以即使是用DataGrid(GridView)控件,高手们还是只会只使用一个界面而已,而分页肯定都是自己写的,这样一比较利弊就出来了,既然这样那就选择Repeater吧,本篇示例演示使用纯sql语句的双top分页法达到控件分页的功能.
--------------------------------------------------------------------------------
前台代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<TABLE borderColor=#e5e3e3 cellSpacing=0 cellPadding=3 width=790 align=center border=1>
<TR bgColor=#fff9ec>
<TH align="center" width=200 bgColor=#fff9ec>名称</TH>
<TH align="center" width=200 bgColor=#fff9ec>类别</TH>
<TH align="center" width=200 bgColor=#fff9ec>发布时间</TH>
&n
相关文档:
在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......
新建表:
create table [表名]
(
[自动编号字段] int IDENTITY (1,1) PRIMARY KEY ,
[字段1] nVarChar(50) default '默认值' null ,
[字段2] ntext null ,
[字段3] datetime,
[字段4] money null ,
[字段5] int default 0,
[字段6] Decimal (12,4) default 0,
[字段7] image null ,
)
删除表:
Drop table [表 ......
一 单词解释(2分/个) 34分
Data 数据 Database 数据库 RDBMS 关系数据库管理系统 GRANT 授权
REVOKE 取消权限 DENY 拒绝权限 DECLARE 定义变量 PROCEDURE存储过程
事务 Transaction 触发器 TRIGGER 继续 continue 唯一 unqiue
主键 primary key 标识列 identity 外键 foreign key 检 ......
1)
假定有一个用户表,表中包含字段:
userid
(int)
、
username
(varchar)
、
password(varchar)
、等,
该表需要设置主键,以下说法正确的是()。(选择两项)
a)
如果不能有同时重复的
username
和
password
,那么
username
和
password
可以组合在一起作为主键。
  ......
Introduction
Microsoft SQL Server 2008 R2 is the latest release of SQL Server. This article will introduce the top 10 features and benefits of SQL Server 2008 R2. The “R2” tag indicates this is an intermediate release of SQL Server and not a major revision. However, there are a number o ......