Hello,
I have a form, which has 20 input fields for name and phone numbers.
ie
"Name1" runat="server">
"Phone1" runat="server">44
This goes from name1 and phone1 to 20. In my protected void Button1_Click(object sender, EventArgs e) Whats the best way to catch all this values. I have tried using the
1. foreach (string element in Request.Form)
But cant get my way around getting all the names and value pairs
2. Manually catching all the values using
string name1 = Name1.Text.ToString();
string name2 = Name2.Text.ToString();
etc
Whats the most efficient way around this ?
Thanks
Ehi