<%@ LANGUAGE="VBSCRIPT"%>
<% Response.Buffer=True%>
Cvičení k ASP - (c) 2000 Ing. Radim Farana, CSc.
Dim I, J, Par1, Data1, Num1, Num2, CRLF
Dim ReData
CRLF = Chr(13) & Chr(10)

Rozbor vlastností dokumentu

Objekt Application

Kolekce Contents

Num1 = Application.Contents.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Application.Contents.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    Data1 = Application.Contents(Par1)
    If Data1="" Then Data1 = " "
    Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Kolekce StaticObjects

Num1 = Application.StaticObjects.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Application.StaticObjects.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    Data1 = Application.StaticObjects(Par1)
    If Data1="" Then Data1 = " "
    Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Objekt ObjectContext


Objekt Request

Vlastnosti

Par1 = Request.TotalBytes
'If Par1=0 Then
'    ReData = ""
'Else
'    ReData = Request.BinaryRead(Par1)
'End If
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Parametr</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>TotalBytes</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Par1 & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
'Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>Obsah zjištěný metodou BinaryRead</TD>" & CRLF
'Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Server.HTMLEncode(ReData) & "</TD>" & CRLF
'Response.Write "</TR>" & CRLF
Response.Write "</TABLE>" & CRLF

Kolekce QueryString (metoda GET)

Num1 = Request.QueryString.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Request.QueryString.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    If Request.QueryString(Par1).Count>1 Then
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & CRLF
       Num2 = Request.QueryString(Par1).Count
       Response.Write "    Počet prvků: " & Num2 & CRLF
       For J=1 to Num2
           Data1 = Request.QueryString(Par1)(J)
           Response.Write "    <BR>" & Data1 & CRLF
       Next
       Response.Write "    </TD>" & CRLF
    Else
       Data1 = Request.QueryString(Par1)
       If Data1="" Then Data1 = " "
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    End If
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Kolekce Form (metoda POST)

Num1 = Request.Form.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Request.Form.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    If Request.Form(Par1).Count>1 Then
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & CRLF
       Num2 = Request.Form(Par1).Count
       Response.Write "    Počet prvků: " & Num2 & CRLF
       For J=1 to Num2
           Data1 = Request.Form(Par1)(J)
           Response.Write "    <BR>" & Data1 & CRLF
       Next
       Response.Write "    </TD>" & CRLF
    Else
       Data1 = Request.Form(Par1)
       If Data1="" Then Data1 = " "
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    End If
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Kolekce Cookies

Num1 = Request.Cookies.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Request.Cookies.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    If Request.Cookies(Par1).HasKeys Then
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & CRLF
       Num2 = Request.Cookies(Par1).Count
       Response.Write "    Počet prvků: " & Num2 & CRLF
       For J=1 to Num2
           Data1 = Request.Cookies(Par1).Key(J) & " = " & Request.Cookies(Par1)(J)
           Response.Write "    <BR>" & Data1 & CRLF
       Next
       Response.Write "    </TD>" & CRLF
    Else
       Data1 = Request.Cookies(Par1)
       If Data1="" Then Data1 = " "
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    End If
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Kolekce ClientCertificate

Num1 = Request.ClientCertificate.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Request.ClientCertificate.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    If Request.ClientCertifikate(Par1).Count>1 Then
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & CRLF
       Num2 = Request.ClientCertificate(Par1).Count
       Response.Write "    Počet prvků: " & Num2 & CRLF
       For J=1 to Num2
           Data1 = Request.ClientCertificate(Par1)(J)
           Response.Write "    <BR>" & Data1 & CRLF
       Next
       Response.Write "    </TD>" & CRLF
    Else
       Data1 = Request.ClientCertificate(Par1)
       If Data1="" Then Data1 = " "
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    End If
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Kolekce ServerVariables

Num1 = Request.ServerVariables.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Request.ServerVariables.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    If Request.ServerVariables(Par1).Count>1 Then
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & CRLF
       Num2 = Request.ServerVariables(Par1).Count
       Response.Write "    Počet prvků: " & Num2 & CRLF
       For J=1 to Num2
           Data1 = Request.ServerVariables(Par1)(J)
           Response.Write "    <BR>" & Data1 & CRLF
       Next
       Response.Write "    </TD>" & CRLF
    Else
       Data1 = Request.ServerVariables(Par1)
       If Data1="" Then Data1 = " "
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    End If
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Objekt Response

Vlastnosti

Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Parametr</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>Buffer</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Response.Buffer & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>CacheControl</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Response.CacheControl & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>Charset</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Response.Charset & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>ContentType</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Response.ContentType & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>Expires</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Response.Expires & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>ExpiresAbsolute</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Response.ExpiresAbsolute & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>IsClientConnected</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Response.IsClientConnected & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>PICS</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>--- nelze číst</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>Status</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Response.Status & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "</TABLE>" & CRLF

Kolekce Cookies

Num1 = Request.Cookies.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Request.Cookies.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    If Request.Cookies(Par1).HasKeys Then
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & CRLF
       Num2 = Request.Cookies(Par1).Count
       Response.Write "    Počet prvků: " & Num2 & CRLF
       For J=1 to Num2
           Data1 = Request.Cookies(Par1).Key(J) & " = " & Request.Cookies(Par1)(J)
           Response.Write "    <BR>" & Data1 & CRLF
       Next
       Response.Write "    </TD>" & CRLF
    Else
       Data1 = Request.Cookies(Par1)
       If Data1="" Then Data1 = " "
       Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    End If
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Objekt Server

Vlastnosti

Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Parametr</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>ScriptTimeout</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Server.ScriptTimeout & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "</TABLE>" & CRLF

Objekt Session

Vlastnosti

Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Parametr</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>CodePage</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Session.CodePage & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>LCID</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Session.LCID & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>SessionID</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Session.SessionID & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>Timeout</TD>" & CRLF
Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Session.Timeout & "</TD>" & CRLF
Response.Write "</TR>" & CRLF
Response.Write "</TABLE>" & CRLF

Kolekce Contents

Num1 = Session.Contents.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Session.Contents.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    Data1 = Session.Contents(Par1)
    If Data1="" Then Data1 = " "
    Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Kolekce StaticObjects

Num1 = Session.StaticObjects.Count
Response.Write "<P>Počet členů: " & Num1 & CRLF
Response.Write "<TABLE WIDTH='100%' BORDER=1>" & CRLF
Response.Write "<TR><TH ALIGN=LEFT VALIGN=TOP Width='30%'>Klíč</TH>" & CRLF
Response.Write "    <TH ALIGN=LEFT VALIGN=TOP Width='70%'>Hodnota</TH>" & CRLF
Response.Write "</TR>" & CRLF
For I=1 to Num1 
    Par1 = Session.StaticObjects.Key(I)
    Response.Write "<TR><TD ALIGN=LEFT VALIGN=TOP Width='30%'>" & Par1 & "</TH>" & CRLF
    Data1 = Session.StaticObjects(Par1)
    If Data1="" Then Data1 = " "
    Response.Write "    <TD ALIGN=LEFT VALIGN=TOP Width='70%'>" & Data1 & "</TD>" & CRLF
    Response.Write "</TR>"
Next
Response.Write "</TABLE>"

Zpět na hlavní stránku


Copyright © 2000 Radim Farana