Retrieving an Item from a Collection

The following example retrieves the value of PATH_INFO from the ServerVariables collection.

Public Function OnStartPage(myScriptingContext As ScriptingContext)

  'Create a copy of the Request object
  Set myRequest = myScriptingContext.Request

  'Create a copy of the Response object
  Set myResponse = myScriptingContext.Response

  'Print the value of PATH_INFO in the ServerVariables collection
  myResponse.Write (myRequest.ServerVariables("PATH_INFO"))

End Function
 

© Microsoft Corporation. All rights reserved.