For a known ID? no.
Even if you loop through controls, you will still have to match the values
to the IDs. Now, there is a potential of creating a hashtable to store names
and values at the same time you create the control and matching changed
values. If you can then pass this to a database as a "parameter collection",
you are golden. Realize, however, that this ease of "coding" can be murder on
performance with all of the boxing and unboxing that goes on.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"wapsiii" wrote:
I have a form to which I add sets of input controls ie. textbox 1,
dropdownlist 1, textbox 2, dropdownlist 1, textbox 3, dropdownlist 3.
The number of sets vary.
I give them unique IDs the following way: txt_1, ddl_1, txt_2, ddl_2,
txt_3, ddl_3.
When the form is submitted I retrieve the values of the dynamically
added controls by iterating over the request.form collection looking
for IDs txt_ and ddl_
Is there a better way to retrieve the values?
Morten