Retrieving an Item from a Collection

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

public void OnStartPage(IScriptingContext objContext)
{
    IResponse response        = objContext.getResponse();
    IRequestDictionary  rdist = objContext.getRequest().getServerVariables();

    Variant v = rdist.getItem(new Variant("PATH_INFO"));

    response.Write(new Variant(v.toString()));     
 
}
 

© Microsoft Corporation. All rights reserved.