Asp 返回引用類(lèi)型函數(shù)代碼
更新時(shí)間:2010年03月14日 17:22:30 作者:
Asp函數(shù)返回引用類(lèi)型代碼,需要的朋友可以參考下。
復(fù)制代碼 代碼如下:
<%
set studentinstance = CreateStudent()
if not isnull(studentinstance) then
Response.write("StudentId:"&studentinstance.StudentId&"<Br/>")
Response.write("StudentName:"&studentinstance.StudentName&"<Br/>")
end if
Function CreateStudent()
set stud = new Statudent
stud.StudentId=123
stud.StudentName="Eric liu"
set CreateStudent=stud
End Function
Class Statudent
private id
private name
public property let StudentId(id_)
id=id_
end property
public property get StudentId
StudentId=id
end property
public property let StudentName(name_)
name=name_
end property
public property get StudentName
StudentName=name
end property
End Class
%>
相關(guān)文章
抽取10萬(wàn)條數(shù)據(jù),想起GetRows()
抽取10萬(wàn)條數(shù)據(jù),想起GetRows()...2006-12-12
如何在ASP頁(yè)面動(dòng)態(tài)Inclue文件?
如何在ASP頁(yè)面動(dòng)態(tài)Inclue文件?...2006-12-12
asp下實(shí)現(xiàn)代碼的“運(yùn)行代碼”“復(fù)制代碼”“保存代碼”功能源碼
下面的代碼是通過(guò)字符替換的方法,不是正則表達(dá)式2008-12-12
SQLServer ADODB.Recordset 錯(cuò)誤“800a0e78”,對(duì)象關(guān)閉時(shí),不允許操作
今天在幫一個(gè)客戶(hù)維護(hù)網(wǎng)站的時(shí)候,運(yùn)行asp提示ADODB.Recordset 錯(cuò)誤“800a0e78”,對(duì)象關(guān)閉時(shí),不允許操作,原來(lái)是asp與sqlserver的連接出問(wèn)題導(dǎo)致2014-07-07

