下拉框用于选择另一个下拉框 [英] drop down box use to how to select another drop down box
本文介绍了下拉框用于选择另一个下拉框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有3个下拉框国家,州,城市。如果我选择印度在国家我应该得到印度州的状态,如果我选择州的AP,那么我应该得到城市的AP城市。这些数据在一个表中。如何选择此下拉列表
解决方案
您好,
请确保您有单独的数据表作为最佳实践。
如需参考样本,请查看以下链接。
http://www.dotnetfox.com/articles/ajax-cascading-dropdown-example- with-database-in-Asp-Net-1078.aspx [ ^ ]
< a href =http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in-ASP.Net.aspx> http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in -ASP.Net.aspx [ ^ ]
http://www.aspdotnet-suresh.com/2011/01/introduction-here-i-will- explain-how-to.html [ ^ ]
http://www.asp.net/web-forms/overview/ajax -control-toolkit / cascadingdropdown / using-cascadingdropdown-with-a-database-cs [ ^ ]
对于表格设计请参考以下链接。
http://stackoverflow.com/questions/10971300/what-is-the-best-way-to-design-a-city-state-country-table [ ^ ]
http://community.sitepoint.com/t/database- normalization-city-and-country-tables-etc / 35444/4 [ ^ ]
http://stackoverflow.com/questions/2007447/best-database-design-for-city-zip-state-tables [ ^ ]
I having 3 drop down box "country", "State", "city". if i select "India" in country i should get states of India in state and if i select the "AP" in state then i should get the cities of AP in city. These data are in one table . How can i select this drop down
解决方案
Hi,
Please make sure you have data in separate table as a best practice.
For sample reference check the below links .
http://www.dotnetfox.com/articles/ajax-cascading-dropdown-example-with-database-in-Asp-Net-1078.aspx[^]
http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in-ASP.Net.aspx[^]
http://www.aspdotnet-suresh.com/2011/01/introduction-here-i-will-explain-how-to.html[^]
http://www.asp.net/web-forms/overview/ajax-control-toolkit/cascadingdropdown/using-cascadingdropdown-with-a-database-cs[^]
For table design please refer below links .
http://stackoverflow.com/questions/10971300/what-is-the-best-way-to-design-a-city-state-country-table[^]
http://community.sitepoint.com/t/database-normalization-city-and-country-tables-etc/35444/4[^]
http://stackoverflow.com/questions/2007447/best-database-design-for-city-zip-state-tables[^]
这篇关于下拉框用于选择另一个下拉框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文