The Asp function returns the reference type code, friends in need can refer to it. Copy the code code as follows:
<%
set studentinstance = CreateStudent()
if not isnull(studentinstance) then
Response.write(StudentId:&studentinstance.StudentId&<Br/>)
Response.write(StudentName:&studentinstance.StudentName&<Br/>)
end if
FunctionCreateStudent()
set stud = new Student
stud.StudentId=123
stud.StudentName=Eric liu
set CreateStudent=stud
End Function
Class Student
private id
private name
public property let StudentId(id_)
id=id_
end property
public property getStudentId
StudentId=id
end property
public property let StudentName(name_)
name=name_
end property
public property getStudentName
StudentName=name
end property
End Class
%>