tags:

views:

57

answers:

2

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.

+5  A: 

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
A: 

you can loop throught Request.Form
Request.Form[index] Request.Form["key"]

Muhammad Akhtar