Программирование в IIS


Пример 1.13


<%@ Language=VBScript %> <HTML> <HEAD> </HEAD> <BODY> <% dim i dim o dim oXML

Response.Write("<p>start Test</p>")

'create the object since this is hard work set o = Server.CreateObject("ConfigSeat.clsChair")

'demonstrate that values were changing Response.Write("<p> color=" & o.color & "</p>") Response.Write("<p>change color to blue</p>") o.color = "blue" Response.Write("<p> color=" & o.color & "</p>")

if o.CreateChair() then Response.Write("<p> new id=" & o.ChairID & "</p>") else Response.Write("<p> possible error=" & o.ChairError & "</p>")

end if

set oXML = o.GetChairState()

Response.Write("<p> xml=" & oXML.XML & "</p>")

Response.Write("<p> open new chair</p>")

if not o.OpenChair("20021129095221") then Response.Write("<p> possible error=" & o.ChairError & "</p>") end if

Response.Write("<p> new chair color should be purple</p>") Response.Write("<p> new chair color =" & o.color & "</p>")

'destroy object so it can be created again set o = nothing %> </BODY> </HTML>

Листинг 1.13. DescribeChairFinal.asp used to demonstrate added interface of clsChair.

Закрыть окно






- Начало -  - Назад -  - Вперед -