随笔分类 -  精品转载

转: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... 阅读全文
posted @ 2008-06-13 14:47 gerdy 阅读(5767) 评论(0) 推荐(0)
存储过程分页方法3种(转贴)
摘要:应该是csdn的邹建大大写的吧...set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER procedure [dbo].[pager](--取得当前页数@pagenum int,--取得每页记录数@rowcount int,--返回记录总数@count int output )AS--定义起始记录IDdeclare @start int --定义结束记... 阅读全文
posted @ 2007-09-28 21:17 gerdy 阅读(423) 评论(0) 推荐(0)
datalist分页(第3种)(转贴)
摘要:DataList分页 Repeater和DataList控件提供了一个快速、灵活的表现数据的方式,但是,它们没有内建的分页功能;DataGrid控件提供了内建的分页功能,但它的结构比较复杂。下面就用PagedDataSource类实现Repeater和DataList的分页。 PagedDataSource封装了DataGrid的分页属性,我们可以象DataGrid那样进行分页 阅读全文
posted @ 2007-09-28 21:16 gerdy 阅读(290) 评论(1) 推荐(0)
datalist分页(第二种)(转贴)
摘要:DataList分页主要用到了da.Fill方法的第一个重载方法。 阅读全文
posted @ 2007-09-28 21:14 gerdy 阅读(341) 评论(0) 推荐(0)
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 @ibegin insert into redheadedfile(filenames,senduser) values('我的 分页算法','万级分页算法') set @i=@i+1 end 阅读全文
posted @ 2007-09-28 21:13 gerdy 阅读(222) 评论(0) 推荐(0)
生成缩略图代码(转帖)
摘要:/**//// /// 生成缩略图 /// /// 源图路径(物理路径) /// 缩略图路径(物理路径) /// 缩略图宽度 /// 缩略图高度 /// 生成缩略图的方式 public static void MakeThumbnail(string originalImagePath, string thumbnailPath, int width, int height, string mod... 阅读全文
posted @ 2007-09-28 21:06 gerdy 阅读(391) 评论(0) 推荐(0)