09 2007 档案
存储过程分页方法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那样进行分页
阅读全文
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 @ibegin
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...
阅读全文
加密web.config办法
摘要:在 Windows 命令行下运行带有下列选项的 ASP.NET IIS 注册工具 (aspnet_regiis.exe):
-pe 选项,向它传递字符串“connectionStrings”以加密 connectionStrings 元素。
-app 选项,向它传递应用程序的名称。
aspnet_regiis.exe 工具位于 %systemroot%\Microsoft.NET\Framework\versionNumber 文件夹中。
下面的示例演示如何对名为 SampleApplication 的应用程序的 Web.config 文件的 connectionStrings 节进行加密:
阅读全文
自增长ID的例子
摘要:以下为sql server的存储过程:create procedure Pro_GenerateID(@tableName varchar(50), --要产生递增号的表名@columnName varchar(50), --要产生递增号的列名@signID varchar(20) --标记符,如是以G-1,G-2,G-3...形式递增,如果给@signID传递'G-'则返回G-4)asdecla...
阅读全文
每日记录
摘要:reg扩展名的注册文件不能有空格,否则系统会判断错误!!!title="<%# XPath('rate')%>" // 千万记得别用两双引号.public void test(object sender,ajaxtoolkit.ratingEventargs e){ e.tag=表达式;}gridviewRowEventargs e //同上e.Row.Cells[0].Attribu...
阅读全文
sql心得
摘要:select ziduan1+","+ziduan2 "newziduan from table1 where ziduan3 =canshu 改变标题方法: 1.select ziduan1 "newziduan" from table1; 2.select 新字段=ziduan from table1; 删除重复行: select distinct* from table //使用关键...
阅读全文
浙公网安备 33010602011771号