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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:30:40+00:00 2026-05-11T19:30:40+00:00

I am creating an ASP.NET application in which the administrator of the program will

  • 0

I am creating an ASP.NET application in which the administrator of the program will be able to define custom fields for forms that the users will fill out and submit.

The admin needs to define various types of fields like checkboxes, radio buttons, textboxes, and textareas for the user to fill out. The admin also can define whether these custom fields should be required.

I am in the planning stages now and am wondering about how I will store these custom field definitions in the database and how I will render them out and make them function.

EDIT

The form data that is submitted by end users with these dynamically created form fields also has to be persisted in the database.

How can I tackle this problem?

  • 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-11T19:30:40+00:00Added an answer on May 11, 2026 at 7:30 pm

    Without having done this or really anything like it, I would think your DB structure might include the type of control, its name, its value type, if its validated, how its validated, if its required. Then as you are reading through the records/dataset of controls desired, you would probably compare the control type in the recordset to the translated value and then add it to the webform.

    For example:

    if(drow["ControlType"].ToString().ToUpper() == "TEXTBOX")
    {
        Label lbl = new Label();
        lbl.Text = drow["ControlLabel"].ToString();
        TextBox txt = new TextBox();
    
        //TO GET THE VALUE ON POSTBACK LATER
        txt.ID = drow["ControlID"].ToString();
    
        //PROBABLY NOT NECESSARY
        Div myDiv = new Div();
        myDiv.Controls.Add(lbl);
        myDiv.Controls.Add(txt);
    
        //ADD THE DIV ABOVE TO THE FORM/PANEL/DIV/ETC.
        MyForm.Controls.Add(myDiv);
    }
    

    This in theory would put the label next to the textbox control. I have no idea if the Div would work, but you can run through this type of thing for CheckBox, TextBox, Label, etc.

    Once the controls and labels are on the page, you’ll want some form of action to cause the server to save the values to a DB. I’d recommend storing the table and column name with the list of objects. Then map the form field over to a DB column for the insert. (keep in mind this explanation is like at 200,000 feet)

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

Sidebar

Ask A Question

Stats

  • Questions 123k
  • Answers 123k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can run this query: ALTER TABLE table_name ENGINE =… May 12, 2026 at 1:01 am
  • Editorial Team
    Editorial Team added an answer From Wikipedia The stdlib.h and stddef.h header files define a… May 12, 2026 at 1:01 am
  • Editorial Team
    Editorial Team added an answer That executable is a "Linux executable" - that is, it's… May 12, 2026 at 1:01 am

Related Questions

I am creating an ASP.NET MVC application that has postcode lookup functionality. I capture
I have an ASP .NET web application which uses Forms Authentication. Let's call this
I have a site that I am currently working on in ASP.NET 2.0 using
I am trying to become a good programming citizen through learning more about Dependency

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.