I have a number of scripts that need to respond to both form post and query string parameters. These scripts were originally written in 1.x and the ubiquitous FormField() would retrieve anything from anywhere. I'm finally moving up to 2.X and need to recast these programs into scripts. I know if I leave the 1.X compatibility on it will still work, but I'd like to actually shift the functionality.
So my question is this. From reading the documentation it appears that the Request.Form("foobar") will ONLY retrieve information from a Form Post and Request.QueryString("foobar") will ONLY retrieve information from after the "?" in a script call. Is this true or is one or the other ubiquitous as FormField() was in 1.x?
Assuming that they are differentiated in what type of information they are capable of retrieving, would the following work?
if Request.Form("foobar") != "C"
lc_foobar = Request.QueryString("foobar")
lc_foobar = Request.Form("foobar")
The "if" would determine the source of the information allowing me to accumulate passed information appropriately?
I know I could write wrapper scripts for each instance for each possibility, but that would triple the number of scripts necessary. I'd much rather have each script capable of everything necessary within itself.
Thanks in advance.