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 4589912
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:09:42+00:00 2026-05-21T22:09:42+00:00

I will be starting a project soon at my company and the client would

  • 0

I will be starting a project soon at my company and the client would like to have the option in the portal to add textboxes or checkboxes as an administrator,,, so for instance initially I may have something like

Name [textBox]
Phone [textBox]


So the client would like to log in as an admin and be able to add

Name [textBox]
Phone [textBox]
Receive Brochure [checkBox] //added by client.

Forget about the portal and the admin part.. what I would like to know is what would be the best way to design this (the user to be able to add elements)

Any ideas would be much appreciated

Regards

  • 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-21T22:09:42+00:00Added an answer on May 21, 2026 at 10:09 pm

    You could create an additional aspx-form in which the User (or the Admin) is able to define and create his/her own forms, you supply the Variable names and they choose to add the controls, save it in a specific scheme in the Database, e.g.

    UserForm:
    UserID FormID

    Form:
    FormID FormName

    FormElement:
    FormID VariableName ControlType Index

    Of course this could also be done by an administrator and be visible by everyone.

    To view the specific forms you could add yet another aspx-page containing the following code:

    protected void Page_Load(object sender, EventArgs e)
        {
            //you saved the FormName or ID to Session when you accessed it
            string formName = Session["FormName"].ToString();
            //this handles getting the elements for this Form from DB
            List<FormElement> elementList = FormElement.GetForForm(formName);
            this.renderForm(elementList);
        }
    
        private void renderForm(List<FormElement> eList)
        {
            foreach(FormElement fe in eList)
            {
                //Labels left, Controls right, of course this is just a design decision
                if(fe.Index%2==1)
                {
                    Label lbl = new Label();
                    lbl.Text = fe.Variable;
                    lbl.ID = fe.ControlType + fe.Variable;
                    divLeft.Controls.Add(lbl);
                }
                else
                {
                    dynamic ctrl = null;
                    switch (fe.ControlType)
                    {
                        case "TextBox":
                            ctrl = new TextBox();
                            break;
                        case "CheckBox":
                            ctrl = new CheckBox();
                            break;
                        default:
                            break;
                    }
                    ctrl.ID = fe.ControlType + fe.Variable;
                    divRight.Controls.Add(ctrl);
                }
            }
        }
    

    Later on after the User hitting submit you’d be able to receive the values entered into those Controls by accessing divRight.FindControl(fe.ControlType + fe.Variable) since that should be unique per Form.

    This approach assumes you’re using .NET 4.0 (because of dynamic), but of course you can do this just fine without it, it’ll just be more code.

    Please let me know if this is what you searched for or if it was helpful.

    Thanks,

    Dennis

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

Sidebar

Related Questions

So I am starting out on company project that will have several components: At
I am starting a project for which we will have a thin client, sending
I am starting a project that will have many files (like a web servers
I will be starting a simple datastore-and-search project soon. Basically, one of those put
I will soon be starting a final year Engineering project, consisting of the real-time
I am starting a web application project that will have an Adobe Flex front-end
I will be starting a new project soon. The details on the type of
I'll be starting an Android project soon to learn about Android and will be
I am starting a major project and will be hiring developers soon. Right now
Has anyone done something like this? How? I'm just starting a project that will

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.