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

  • Home
  • SEARCH
  • 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

Related Questions

I have an ASP.NET MVC 2 application in which I am creating a custom
I have an ASP.NET application which tracks statistics by creating and writing to custom
I am creating a ASP.NET application that is pretty much self contained, it will
I'm creating an ASP.NET application which uses Facebook Connect and fbml tags. It also
I am creating an ASP.NET MVC application that has postcode lookup functionality. I capture
I'm creating an intranet asp.net mvc application that everyone in the company should have
I am creating custom membership provider for my asp.net application. I have also created
Working inside the context of an ASP.NET application I am creating a page that
I have an ASP .NET web application which uses Forms Authentication. Let's call this
I am working on a asp.net application in which i am creating a page

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.