I have a situation here where the user has about 100 controls mostly multi select listboxes
but some other stuff peppered in (drop downs checkboxes) and they narrow down complex search criteria for screenings. When they go back later they want the act of pulling up a record to reset the controls to the values that they had used to match the criteria.
So I made a table that has a column for each control and iterativley stores the values – comma
deliminated for listboxes – when the user locks in the search criteria to move to the next step.
Other then using a switch to say if value is x: set control x to value(s) so and so is there a good way to iterate through this, seeing as the name of the column is the name of the control ? I’m stumped at the moment …

var CParam = QueryFnc.RstrCntrls(Jnum, Qnum);
foreach(var a in CParam)
{
//Map Values to Matching Named Control
}
As long as your control tree remains constant, you can use control indices to map values. However better bet would be to use control IDs (if its .NET4 then go for predictable ids or manual id assignment for better controls) to map values.
Instead of storing values across columns in one row, I will prefer a table that will store values across rows. For example,
This will make things a lot simpler – get rows for the given user id and then iterate over rows. For each row, you can find the control using
FindControlmethods (you may have to roll up a recursive implementation in case you have naming containers in your control hierarchy) and then write simple switch statement to assign value to control based on control type.