Due to the project needs, an infinite level linkage drop-down menu has been developed.
Check the information on the Internet, not find it, share it here with you.
The idea is: Add a client control Repeater in the ASPX page, then add a DROPDOWNLIST control in the Repeater's ITEM item, which is the key.
Database: Need a name field, a parent ID field
In the background:! Ispostback, the Repeater's value condition is parentid = 0, each time Postback, find the value of the drop-down box to select the value of the value of the value of the value of the value of the value of the value of the value of the value of the REPEATER.
A idea: When postback, it is necessary to judge whether the neighbor DROPDOWNLIS is a father and child relationship. If it is not, take only the value of the previous DropDownList as a parent IDS.
The whole idea is only, but this unlimited level is connected to a shortcoming is that the database is called multiple times. If you have a better idea, please discuss.