Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6086197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:43:28+00:00 2026-05-23T11:43:28+00:00

I have a situation here where the user has about 100 controls mostly multi

  • 0

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 …

enter image description here

    var CParam = QueryFnc.RstrCntrls(Jnum, Qnum);
    foreach(var a in CParam)
    {
        //Map Values to Matching Named Control


    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:43:29+00:00Added an answer on May 23, 2026 at 11:43 am

    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,

    UserId  ColumnName  ControlID  Value
    ------  ----------  ---------  --------
    1       ABC         ddlAbc     52
    1       XYZ         ddlXyz     102, 32
    ...
    2       XYZ         ddlXyz     23   
    

    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 FindControl methods (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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my current situation: I have a user class that has an attribute
Here's the situation: We have some generic graphics code that we use for one
here's the situation: I have a where in every cell all the area has
Here's the situation: i have a SearchPage where an user can make a complex
I have a very common situation here. And for years I haven't found if
Here's the situation: I have a label's text set, immediately followed by a response.redirect()
Here is the situation: I have been called upon to work with InstallAnywhere 8,
Here's the situation: we have an Oracle database we need to connect to to
Here is my situation: I have an application that use a configuration file. The
Here is the situation : we have to offer a customer with a web-based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.