B
brett
On a postback, what is the best way to get FORM variables so that there
is a key/value structure that allows accessing by key name. For
example:
INSERT INTO table1 (keys['columnone'], keys['columntwo'])
values (keys['columnone'].value, keys['columntwo'].value)
I need to keep keys and values synchronized and call by variable name.
I'm currently doing:
NameValueCollection coll=Request.Form;
and access keys this way in a for loop
coll.Keys
then another for loop for the values. I need more control however.
Meaning accessing by variable name.
Thanks,
Brett
is a key/value structure that allows accessing by key name. For
example:
INSERT INTO table1 (keys['columnone'], keys['columntwo'])
values (keys['columnone'].value, keys['columntwo'].value)
I need to keep keys and values synchronized and call by variable name.
I'm currently doing:
NameValueCollection coll=Request.Form;
and access keys this way in a for loop
coll.Keys
then another for loop for the values. I need more control however.
Meaning accessing by variable name.
Thanks,
Brett