Asp 返回引用类型函数代码
更新时间:2010年03月14日 17:22:30 作者:
Asp函数返回引用类型代码,需要的朋友可以参考下。
复制代码 代码如下:
<%
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
%>
相关文章
asp下实现代码的“运行代码”“复制代码”“保存代码”功能源码
下面的代码是通过字符替换的方法,不是正则表达式2008-12-12
SQLServer ADODB.Recordset 错误“800a0e78”,对象关闭时,不允许操作
今天在帮一个客户维护网站的时候,运行asp提示ADODB.Recordset 错误“800a0e78”,对象关闭时,不允许操作,原来是asp与sqlserver的连接出问题导致2014-07-07


最新评论