Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, June 13, 2016 3:19 AM
Hi,
I need to populate a drop down list with option groups to be able to group the drop down list items. There are a lot of discussion on the web but more I read, more confused I get. Most of them are manually adding their tables and data items. whereas , mine is coming from a SQL database with a lot of tables joins.
Is anyone able to guide me through how to create such a drop down list?
I need to do something like this:
http://stackoverflow.com/questions/16167862/how-can-i-add-option-groups-in-asp-net-drop-down-list
Thanks,Mary
All replies (2)
Monday, June 13, 2016 4:25 AM ✅Answered
Most of them are manually adding their tables and data items. whereas , mine is coming from a SQL database with a lot of tables joins.
You can take a look at this article :
Monday, June 13, 2016 6:41 AM ✅Answered
Hi Mary_Nem,
So your question is more likely related to how to read data from database , You could use ADO.NET :
Also below article implements the HTML optgroup in a dropdownlist dynamically using ASP.NET MVC and Entity Framework :
Best Regards,
Nan Yu