Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looping through a form to get field names and filed values issue (classic ASP)

on submit of a form, I would like to capture the field names and values of the forms and I want them passed without even showing in the browser (Response.Write makes them visible in the browser). How I can do this please? I am using this code:

    For Each Item In Request.Form
    fieldName = Item
    fieldValue = Request.Form(Item)

    Response.Write(""& fieldName &" = Request.Form("""& fieldName &""")")       
    Next 
like image 953
Rene Zammit Avatar asked Jan 31 '12 08:01

Rene Zammit


1 Answers

This is a very small snippet I use to show all form fields POSTED

<% 
For x = 1 to Request.Form.Count 
  Response.Write x & ": " _ 
    & Request.Form.Key(x) & "=" & Request.Form.Item(x) & "<BR>" 
Next 
%> 
like image 107
Ravi Ram Avatar answered Oct 06 '22 19:10

Ravi Ram