VBScript Sample: vbscript/general/createobj/bean.asp
   ASP Script
   Comments or Client-side Script
   HTML and Text

<html>
<head>
<title>Accessing a Javabean</title>
</head>
<body>
<p align="right"> <big> <a href="default.html"> Go Back </a> </big></p>
<p><big>Comment:</big>Reference a Javabean, sunw.demo.buttons.DemoCreateObject, and access its properties and methods</p>
<br>
<%
   Set objinfo =Server.CreateObject("sunw.demo.buttons.DemoCreateObject")

   response.Write "<p> Default property is: <big>"
   response.write "<p> Name = " + objinfo.name
   response.write "<p> Address = " + objinfo.address
   response.write "<p> Age = " + cstr(objinfo.age)
   response.write "<p> Salary = " + cstr(objinfo.salary) + " </big>"
   objinfo.name = "wangwu"
   objinfo.address = "China"
   objinfo.age = 34
   objinfo.salary = 72112.00
   response.Write "<p> Modified property is: <big>"
   response.write "<p> Name = " + objinfo.name
   response.write "<p> Address = " + objinfo.address
   response.write "<p> Age = " + cstr(objinfo.age)
   response.write "<p> Salary = " + cstr(objinfo.salary) + " </big>"

%>

<p> Using the repeatmessage method, the result is: </p>
<p> <big> <%= objinfo.repeatmessage(5) %>  </big></p>

</body>
</html>


Copyright © 1998-2002, Halcyon Software Inc. All rights reserved.