|
-
Feb 27th, 2008, 05:29 AM
#1
Thread Starter
Lively Member
[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?
-
Feb 27th, 2008, 06:01 AM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|