I'm not sure the topic describes my problem very well, but I create some HTML elements (text fields) on the fly using jQuery, and I never know how much I will create (it scrolls through the database). Then I want to get all the elements in the code and perform some actions (paste them into another database).
I know I can use
string n = String.Format("{0}", Request.Form["hiddenField0"]).ToString();
To get the first text field, but what if I donβt know how many text fields I created and want them all? Their name begins with hiddenField plus the plus number.
Is there a way to iterate over all elements with a name that starts with a specific string?
Thanks in advance
source
share