|
| |
精品推荐 |
 |
|
| |
|
|
|
|
ASP分页代码,已经写成类了,值得参考
|
日期:2008年1月6日 作者: 查看:[大字体
中字体 小字体]
|
SW_objRS.Open SW_strSQL,SW_objConn,1,1 If Err.Number <> 0 Then strError = "<br>记录集打开失败" On Error Goto 0
If Trim(strError)="" Then SW_blnOpenRS = true Else SW_strError = SW_strError & " <tr bgcolor=""#336699"" height=""28""><td><font color=""#FFFFFF"">SQL属性:</font></td></tr>" & vbcrlf SW_strError = SW_strError & " <tr bgcolor=""#ffffff""><td>" & strError & "</td></tr>" & vbcrlf End If End Property
'***************************************** ' 类型: 属性 ' 目的: 设置需要显示的数据的字段名 ' 输入: a_strFldName:字段名字符串,多个字段之间以逗号分隔 ' 返回: 无 '***************************************** Public Property Let FieldList(a_strFldName) Dim strError
SW_blnFieldList = false If Trim(a_strFldName) <> "" Then SW_aryFldName = Split(LCase(a_strFldName),",") Else strError = strError & "<br>你必须设置需要显示的字段名,否则无法显示数据" End If If Trim(strError)="" Then SW_blnFieldList = true Else SW_strError = SW_strError & " <tr bgcolor=""#336699"" height=""28""><td><font color=""#FFFFFF"">FieldList属性:</font></td></tr>" & vbcrlf SW_strError = SW_strError & " <tr bgcolor=""#ffffff""><td>" & strError & "</td></tr>" & vbcrlf End If End Property
'***************************************** ' 类型: 属性 ' 目的: 设定或显示每页的记录数。 ' 输入: a_intPageSize: 每页显示的记录数。 ' 返回: 每页显示的记录数。 '***************************************** Public Property Let PageSize(a_intPageSize) Dim strError
'PageSize获取失败标志 SW_blnPageSize = false If Trim(a_intPageSize) = "" OR (Not(IsNumeric(a_intPageSize))) Then strError = strError & "<br>非法的pagesize" Else If (a_intPageSize <= 2147483647 And a_intPageSize>=-2147483648) Then SW_intPageSize = CLng(a_intPageSize) Else strError = strError & "<br>PageSize溢出"
上一篇:asp彩色验证码图像生成脚本
下一篇:用ASP实现分页的源码
|
| 相关文章: |
|
|
|
| 相关软件: |
|
|
|
|