站内搜索
分类列表
本类阅读排行
本类推荐文章
- ASP技巧:让Len,Left,Right函数识...
- 用ASP实现IE地址栏参数的判断
- 如何实现ASP.NET网站个性化
- 如何在Asp.net中使用HtmlArea编辑...
- 用ASP.Net实现在线压缩和解压缩
- ASP实现不存在的网页就自动发送邮...
- 用ASP取出HTML里面的图片地址的函...
- asp.net跳转页面的三种方法比较
- 一个Winsock组件
- 用WinSock设计Chat程序(转)
- 在MFC应用中深入定制WebBrowser控...
- 这几天有人问关于编应.dll的问题,...
- 在Visual J++中编写ASP COM组件(转...
- 一个显示Grid的VBScript对象
- 好东西,快来看呀:(转载自中华网...
广告
一个显示Grid的VBScript对象
作者: 来源: 点击: 日期:2007-5-5 23:34:10
是根据MS提供的代码修改而成,目前还不支持编辑,可以排序、查询、分页显示
<%@ Language=VBScript %>
<% Option Explicit %>
<%
Class classDataGrid
Private m_strSQL
Private m_strConn
Private m_strRowColor1
Private m_strRowColor2
Private m_strMode
Private m_strProcessPage
Private m_strTitle
Private m_strRSName
Private m_strFindFields
Public Property Get SQL()
SQL = m_strSQL
End Property
Public Property Let SQL(strSQL)
m_strSQL = strSQL
End Property
Public Property Get Conn()
Conn = m_strConn
End Property
Public Property Let Conn(strConn)
m_strConn = strConn
End Property
Public Property Get RowColor1()
If IsNull(m_strRowColor1) Or Len(m_strRowColor1) = 0 Then
RowColor1 = "#ffffff"
Else
RowColor1 = m_strRowColor1
End If
End Property
Public Property Let RowColor1(strRowColor1)
m_strRowColor1 = strRowColor1
End Property
Public Property Get RowColor2()
If IsNull(m_strRowColor2) Or Len(m_strRowColor2) = 0 Then
RowColor2 = "#00ffff"
Else
RowColor2 = m_strRowColor2
End If
End Property
Public Property Let RowColor2(strRowColor2)
m_strRowColor2 = strRowColor2
End Property
Public Property Get Mode()
If IsNull(m_strMode) Or Len(m_strMode) = 0 Then
Mode = "View"
Else
Mode = m_strMode
End If
End Property
Public Property Let Mode(strMode)
If strMode <> "View" And strMode <> "Edit" Then
Response.Write ("模式错误——只允许使用View和Edit<br>")
Response.End
<%@ Language=VBScript %>
<% Option Explicit %>
<%
Class classDataGrid
Private m_strSQL
Private m_strConn
Private m_strRowColor1
Private m_strRowColor2
Private m_strMode
Private m_strProcessPage
Private m_strTitle
Private m_strRSName
Private m_strFindFields
Public Property Get SQL()
SQL = m_strSQL
End Property
Public Property Let SQL(strSQL)
m_strSQL = strSQL
End Property
Public Property Get Conn()
Conn = m_strConn
End Property
Public Property Let Conn(strConn)
m_strConn = strConn
End Property
Public Property Get RowColor1()
If IsNull(m_strRowColor1) Or Len(m_strRowColor1) = 0 Then
RowColor1 = "#ffffff"
Else
RowColor1 = m_strRowColor1
End If
End Property
Public Property Let RowColor1(strRowColor1)
m_strRowColor1 = strRowColor1
End Property
Public Property Get RowColor2()
If IsNull(m_strRowColor2) Or Len(m_strRowColor2) = 0 Then
RowColor2 = "#00ffff"
Else
RowColor2 = m_strRowColor2
End If
End Property
Public Property Let RowColor2(strRowColor2)
m_strRowColor2 = strRowColor2
End Property
Public Property Get Mode()
If IsNull(m_strMode) Or Len(m_strMode) = 0 Then
Mode = "View"
Else
Mode = m_strMode
End If
End Property
Public Property Let Mode(strMode)
If strMode <> "View" And strMode <> "Edit" Then
Response.Write ("模式错误——只允许使用View和Edit<br>")
Response.End
一个显示Grid的VBScript对象 评论
