How to Draw drop down list while excuting ?

ankouny used Ask the Experts™
I'm trying to load fields from excel file and assigns each field to my database field ?
How can I generate each to field of excel a drop down list containing my database fields to let the user choose which field in his excel is what in my database ?
So it is kind of creating dynamic drop down list
I'm using
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
In the application page, you can read the excel file and make a bind it to a grid/repeater etc.
Then get the list of fields from database table and bind it to a dropdownlist against each of excel field.
Here you need to generate the dropdownlist dynamically by code with unique id in ItemRowDataBound event.

And at the end, you can place a button which will save the combination selected in the grid.

Let me know if you have any difficulty.


How can that be done by code ? do you have an example.
I prefer to have it coded in the page not as a javascript ?
Most Valuable Expert 2012
Top Expert 2014
See this example about reading schema information from Excel using ADO.NET

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial