ASP Tutorial Code

GetDigStates.htm:

 

<HTML>

<HEAD>

<TITLE></TITLE>

</HEAD>

<BODY>

<Form Action="digStates.asp" Method="POST">

<P><STRONG><FONT face="" size=5>PI-SDK

Example</FONT></STRONG></P>

 

<P>HTML Page talking to Server side ASP Page which uses

PI-SDK for server information.</P>

 

<P>Enter Server Name:&nbsp;

<INPUT id=text1 name=text1></P>

 

<P>Enter State Set Name:

<INPUT id=text2 name=text2></P>

 

<P><INPUT id=submit1 name=submit1 type=submit value=Submit></P>

</FORM>

</BODY>

</HTML>

 

DigStates.asp:

 

<%@ Language=VBScript %><HTML>
<HEAD>
</HEAD>
<BODY>
<P>&nbsp;</P>
<%
set pisdk = Server.CreateObject ("PISDK.PISDK")
strStateset = Request.Form("text2")
Response.write "<SPAN STYLE='font-weight : bold;'>" & strStateSet & "</SPAN>"
set srv = pisdk.Servers(Request.Form("text1"))
set stateset = srv.StateSets.Item(CStr(strStateSet))
for each digstate in stateset
   Response.Write "<P>" & digstate.name & "</P>"
next
%>
</BODY>
</HTML>

Enabling Operational Intelligence