文章列表
比较万能的分页
select top 每页显示的记录数 * from topic where id not in
(select top (当前的页数-1)×每页显示的记录数 id from topic order by id desc)
order by id desc
SQL2005中的分页代码:
with temptbl as (
SELECT ROW_NUMBER() OVER (ORDER BY id desc)AS Row,
...
)
SELECT * FROM temptbl where Row between @sta ...
.NET中获取字符串的MD5码
- 博客分类:
- ASP
① 导入命名空间:
using System.Web.Security;
② 获取MD5码:
string Password = FormsAuthentication.HashPasswordForStoringInConfigFile(TextBox1.Text.ToString(), "MD5");
.NET使用一般处理程序生成验证码!
- 博客分类:
- ASP
<!--
Document : ASP.NET用一般处理程序生成验证码
Created on : 2008-10-13 17:04
Author : 牛腩
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type ...
.NET截取指定长度汉字超出部分以"..."代替
- 博客分类:
- C#
/// <summary>
/// 将指定字符串按指定长度进行剪切,
/// </summary>
/// <param name= "oldStr "> 需要截断的字符串 </param>
/// <param name= "maxLength "> 字符串的最大长度 </param>
/// <param name= "endWith "> 超过长 ...
/******************************************************
*FileName: SqlHelper
*Copyright (c) 2011-七期提高班
*Writer: 七期提高班 李守宏
*Create Date: 2011/6/12 15:24:28
*Rewriter:
*Rewrite Date:
*Impact:
*Main Content(Function Name、parameters、returns)
********************************* ...
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('加入暂存架成功!');</script>");