PDA

View Full Version : Request.Form Question



DakotaChick
11-21-2007, 11:37 PM
I'm having a litte trouble with a dynamicly built form when it comes to requesting the information contained in it from another page. Seeing as I dont necessarily know what the form elements will be called, how can I request them from another page??

Trying Request.Form(rs("Item") generates the error "The function expects a string as input."

Whatever Jr.
11-22-2007, 09:32 AM
For Each fld In Request.Form
response.write fld & ": " & Request.Form(fld) & "<br>"
Next


HTH, Tom

DakotaChick
11-22-2007, 04:17 PM
Thanks, but there are a few fields on the form that I dont need to gather from. theres some hidden fields being used to calculate cost when quantity is input, I only need to gather the quantity fields and not the cost fields.

Any way to tell it to ignore the type="hidden" form elements?

Whatever Jr.
11-22-2007, 04:23 PM
Prefix the hidden fields with 'hidden' and thr this:

For Each fld In Request.Form
If Instr(fld, "hidden") = 0 Then
response.write fld & ": " & Request.Form(fld) & "<br>"
End if
Next

Tom

shakir
12-01-2007, 08:45 AM
if the object is not exist it will show error, simple methord to avoid error use on error resu me next