精品转载
转:The given key was not present in the dictionary.(问题解决方法)
摘要: 这个一般都是由于主题引用了不存在的分类导致的解决方法:1 查看已经被删除了的分类idSELECT DISTINCT typeid FROM web.dnt_topics WHERE typeid NOT IN (SELECT DISTINCT typeid FROM web.dnt_topictypes)2 更新包含此分类的主题UPDATE dnt_topics SET typeid=0 WHER...阅读全文
存储过程分页方法3种(转贴)
摘要: 应该是csdn的邹建大大写的吧...set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER procedure [dbo].[pager](--取得当前页数@pagenum int,--取得每页记录数@rowcount int,--返回记录总数@count int output )AS--定义起始记录IDdeclare @start int --定义结束记...阅读全文
datalist分页(第3种)(转贴)
摘要: DataList分页
Repeater和DataList控件提供了一个快速、灵活的表现数据的方式,但是,它们没有内建的分页功能;DataGrid控件提供了内建的分页功能,但它的结构比较复杂。下面就用PagedDataSource类实现Repeater和DataList的分页。 PagedDataSource封装了DataGrid的分页属性,我们可以象DataGrid那样进行分页阅读全文
Repeater和DataList控件提供了一个快速、灵活的表现数据的方式,但是,它们没有内建的分页功能;DataGrid控件提供了内建的分页功能,但它的结构比较复杂。下面就用PagedDataSource类实现Repeater和DataList的分页。 PagedDataSource封装了DataGrid的分页属性,我们可以象DataGrid那样进行分页阅读全文
datalist分页(第二种)(转贴)
摘要: DataList分页主要用到了da.Fill方法的第一个重载方法。阅读全文
datalist分页(第一种方法)(转贴)
摘要: 首先创建一张表(要求ID自动编号):
create table redheadedfile(
id int identity(1,1),
filenames nvarchar(20),
senduser nvarchar(20),
primary key(id)
)
然后我们写入50万条记录:
declare @i int
set @i=1
while @i<=500000
begin
insert into redheadedfile(filenames,senduser) values('我的
分页算法','万级分页算法')
set @i=@i+1
end
阅读全文
create table redheadedfile(
id int identity(1,1),
filenames nvarchar(20),
senduser nvarchar(20),
primary key(id)
)
然后我们写入50万条记录:
declare @i int
set @i=1
while @i<=500000
begin
insert into redheadedfile(filenames,senduser) values('我的
分页算法','万级分页算法')
set @i=@i+1
end
阅读全文
生成缩略图代码(转帖)
摘要: /**//// /// 生成缩略图 /// /// 源图路径(物理路径) /// 缩略图路径(物理路径) /// 缩略图宽度 /// 缩略图高度 /// 生成缩略图的方式 public static void MakeThumbnail(string originalImagePath, string thumbnailPath, int width, int height, string mod...阅读全文
