Save & restore a form's postback values with SQL

1

1388-2/HB

I have a page with a significant number of dynamically created radio
buttons, checkboxes and textboxes.

When a user is presented with this form and subsequently fills a bunch of
stuff out, when they click submit I want to save their postback data (i.e.,
which checkboxes are checked, which radio buttons are pushed and what's
typed into the textboxes).

Then later I want another user to be able to view one of these forms and
elect to have it be "filled out" for them, using whatever the first user
did, at which point I'd need to restore the postback data from SQL and
populate the form.

What's the best way to go about doing this? My first guess is to iterate
the key/value pairs of the form and kludge it all into an SQL varchar field.

For each strKey as String in Request.Form.Keys
<insert deliniated string game here>
Next

Putting it back together sounds messy though, splitting the kludge back up
into strings and then what, .FindControl and .GetType etc?

Is there any way I can just take a "snapshot" the postback data and apply it
to a later form consisting of the same controls without having to parse,
know or care what's actually in the postback data?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top