手机
当前位置:查字典教程网 >编程开发 >ASP教程 >文章内页类
文章内页类
摘要:复制代码代码如下:

复制代码 代码如下:

<%

classMyArticle

dimwenzhang_id

dimtitle1,content1

PrivateSubClass_Initialize()

'response.Write"类的初始化事件:Class_Initialize<br>"

endsub

PrivateSubClass_Terminate()

'response.Write"释放对象事件:Class_Terminate<br>"

endsub

PublicPropertyLetid(byvalv)

wenzhang_id=v

EndProperty

PublicSubconn_sub()

Setconn=Server.createObject("ADODB.Connection")

cnnstr="DRIVER={MicrosoftAccessDriver(*.mdb)};"

cnnstr=cnnstr&"DBQ="&Server.MapPath("admin/WataVase/%29to-dream.mdb")

conn.Opencnnstr

sql="Select*FromArticlewhereDeleted=0andArticleID="&wenzhang_id

setrs=Server.CreateObject("adodb.recordset")

rs.opensql,conn,1,1

title1=rs("Title")

content1=rs("Content")

rs.close

setrs=nothing

conn.close

setconn=nothing

endsub

PublicPropertyGettitle()

title=title1

EndProperty

PublicPropertyGetcontent()

content=content1

EndProperty

endclass

'MyArticle类使用说明

'dimwenzhang

'setwenzhang=newMyArticle

'wenzhang.id=3

'callwenzhang.conn_sub()

'response.writewenzhang.title

'response.writewenzhang.content

'setwenzhang=nothing

%>

【文章内页类】相关文章:

ASP经典分页类

捌度空间 缓存类

ASP文章系统解决方案实现上一页下一页第1/2页

如何编写一个ASP类

asp缓存类

叶子asp分页类

文章列表类别

超级ASP大分页_我的类容我做主

创建一个ASP通用分页类

ASP实现长文章分页

精品推荐
分类导航