How to Draw drop down list while excuting ?

ankouny
ankouny used Ask the Experts™
on
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 vb.net/asp.net
Comment
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.

Author

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

http://davidhayden.com/blog/dave/archive/2006/05/31/2975.aspx

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