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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:24:45+00:00 2026-06-10T03:24:45+00:00

I have a dropdownlist with options 1, 2, and 3. The user selects an

  • 0
  • I have a dropdownlist with options “1”, “2”, and “3”.
  • The user selects an option and presses a button.
  • Based on what number they chose, 1, 2 or 3 textboxes will be created dynamically with IDs textBox_1, textBox_2, textBox_3 (for example).
  • The user will then input into each textbox and press another button and the values of these textboxes are validated and saved.

Could someone please provide code on how to do this (seemingly very simple) task? I have asked two lengthy questions already on my actual project, that seem to have been misunderstood or I have gotten the wrong end of the stick (including the creation of the textboxes on Page_Load/Page_Init use of repeaters etc).

This needs to be done dynamically because in my project there are many controls and this number can vary. I can post my code so far if needs be, but in the other questions this seems to have confused matters.

  • 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-06-10T03:24:46+00:00Added an answer on June 10, 2026 at 3:24 am

    One question: what if the controls are already created, should it be possible to create more than the available number in the dropdown(f.e. 3 +3)?

    Assuming you allow to create more than the number of controls, you need to

    • handle the Button’s Click event
    • add these controls to a placeholder or panel(container control) on the page with the correct id according to their number(f.e. textBox_4)
    • store the total number of controls in a ViewState or Session variable
    • recreate these controls in Page_Init or Page_Load (at the latest) with the same ID as before

    Then you’ve ensured that ViewState gets loaded and events are triggered.

    Here’s code which demonstrates what i mean:

    load dynamic control from a dropdownlist event handler, how to preserve the control after button event

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

Sidebar

Related Questions

I have DropDownList, which has some options to choose from. Now after when user
I have a dropdownlist which has several options for generating reports. Based on the
I have a Dropdownlist <select name=cate> <option value=h>India</option> <option value=m>USA</option> <option value=c>England</option> </select> <input
I have Dropdownlist on my page and its selectedindexchanged method created in code behind
Update: I have a dropdownlist with seven different options like (date, subject, press, cia,
I have a dropdownlist with following options: <asp:DropDownList ID=ddlTaxStatus runat=server OnPreRender=ddlContainerStatus_PreRender> <asp:ListItem Text=--Select-- Value=-1></asp:ListItem>
I need to validate TextBox based on Value selected in DropDownList controls. I have
I have a dropdownlist: <select id=ContentList name=ContentList> <option value=>Please Select</option> <option value=TEST_TOP>TEST TOP</option> </select>
I want to create a form whereby, when a user selects an option from
I have a dropdownlist which is declared as follows: <select onchange=reloadValues(this,event);> ... options here

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.