1

in asp.net c#

how can you get all the names and values of a form that has been posted? i.e the field names are unkown.

raklos
  • 28,027
  • 60
  • 183
  • 301

1 Answers1

12

Loop over all the items in Request.Form.

-- Edit:

Like so:

foreach(string key in Request.Form){
    Response.Write(key + "=" + Request.Form[key]);
}
Noon Silk
  • 54,084
  • 6
  • 88
  • 105