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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:17:02+00:00 2026-05-30T01:17:02+00:00

I am developing a website which retrieves data from a database but im new

  • 0

I am developing a website which retrieves data from a database but im new to web developing.

I use gridviews,dropdown lists and others, to show data but there is a page where the website user will set how many specific dropdown lists will need to do his work.

To be more specific the user will choose products and each products’ quantity but i don’t know how many products the user will need. If the user wants to enter x number of products, i want to create x number of drowdown lists(in different rows), so that he could select x number of products and their quantities.

e.g.
User A wants to select 2 tomatoes,3 potatoes and 5 watermelons.
He will type 3(for number of products) in a textbox and then 3 rows will appear with 2 dropdown lists each, and user will select

tomatoes 2

potatoes 3

watermelons 5

add new line->>>this is another thing i want to create

Any ideas??

  • 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-30T01:17:04+00:00Added an answer on May 30, 2026 at 1:17 am

    In the codebehind, specifically during the Page_Load event, you’ll want to determine how many dropdowns are needed, and then create them on the fly. There are quite a few examples that would result from a google search, but a quick example would look like:

    int countNeeded = 15; //or whatever your code tells you is the right amount
    
    for (int x = 0; x < 15; x++)
    {
        mainContent.Controls.Add(new DropDownList()); 
        //mainContent would be a control on the page that you want to host your controls.
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an Android app that fetches a web page from a website which
I'm currently developing a website which stores bookmarks in a MySQL database using PHP
I am new to Joomla development, I am developing a website in which I
I'm developing a new ASP .NET website which is effectively a subset of the
I am developing a website that relies much on XML data. The web site
I'm developing (.NET MVC) a large website which has the following specifications: Database pages
am new to StackOverflow.. I am developing a website which requires extensive ORM...using asp.net
can we use JQ insted of php for developing website. which one is more
I'm developing a website which will be used in the corporate intranet which uses
I'm developing a website which to begin with will have three clear sub sites:

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.