Retrieves a collection of all the form variables keys and values in the Request.Form() collection so you can iterate the variables.
The collection contains an object that has Key
and Value
properties.
o.GetFormVarCollection(tcPrefix)
Parameters
tcPrefix
Optional prefix for the name of the values to retrieve.
lcDataBuffer
Optional - if passed lets you parse other data buffers than .cFormVars
. Supported values:
- Request.cQueryString
- Request.cServerVars
This allows you retrieve a collection of query string, and server variables in the same way you can with form variables.
Example
loVars = Request.GetFormVarCollection()
*** Iteration of the form variables
FOR EACH loVar in loVars FOXOBJECT
lcKey = loVar.Key
lcValue = loVar.Value
ENDFOR
*** Access by key
lcName = loVars.Item("txtName")
*** Access by Index
lcCompany = loVars.Item(2)
*** Retrieve non-form data collections
loQueryStrings = Request.GetFormVarCollection("", Request.cQueryString)
loServerVars = Request.GetFormVarCollection("", Request.cServerVars)
See also:
Class wwrequest© West Wind Technologies, 1996-2024 • Updated: 03/07/23
Comment or report problem with topic