Results 1 to 2 of 2

Thread: [2005] ASP.NET 2.0 - Multiple DropDown Lists Based on Value

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    111

    Question [2005] ASP.NET 2.0 - Multiple DropDown Lists Based on Value

    Hi All,

    I am trying to create a webpage that will generate drop down lists based on the number entered into a text box. These drop down lists will then pre-populate with data from a database (That part I should have no problems doing). Does anyone have any examples / point me in the right direction?

  2. #2
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: [2005] ASP.NET 2.0 - Multiple DropDown Lists Based on Value

    Use a Repeater Control and add a column with a dropdownlist inside it.

    Create a datatable, and create the number of rows that is entered in the textbox, and these rows to the datatable. You may use an anonymous column name or maybe an ID column from table in your database.

    now bind this datatable to the repeater control.

    In the ItemDataBound event of repeater, get individual DropDownList, and bind them to the DataBase as you normally do.
    Show Appreciation. Rate Posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width