In My asp.net(with C#) Application I Have States DropdownList and Districts Dropdownlist ..and when i select the state corresponding district should come in the district dropdownlst..
Plz Suggest some Solution for this,,,,
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pankaj PandeyRank #642 · 3.7K reputationPosted May 29, 2013, 10:30 PM EDT
i hope sates and districts both you are fetching from database tables.
if yes then given solution will work
state table
state_id statename
1 abc
2 def
districts table
districts_id districts state_id/Statename
1 xyz 1
2 hhh 1
3 kkkk 2
you can get districts by following query
select districts from tbl_districts where statename=@statename
when you store state name in citytable
or
select districts from tbl_districts where state_id =(select state_id from tbl_state where statename=@statename)
you need to pass statename to @statename from first ddl.
mark as answered if helpfull
Jay ParekhRank #1,395 · 1.2K reputationPosted May 29, 2013, 10:38 PM EDT
http://www.itorian.com/2013/02/cascading-dropdownlist-in-aspnet-mvc.html
divya146 reputationPosted May 29, 2013, 10:39 PM EDT
In states dropdown select index changed event, bind the data to district dropdown as given below
Sathish Pabbathi99 reputationPosted May 30, 2013, 12:04 AM EDT
Pankaj PandeyRank #642 · 3.7K reputationPosted May 30, 2013, 3:07 AM EDT
hello
http://www.codeproject.com/Articles/38231/Simple-Way-to-Implement-Country-State-City-Dropdow
http://www.c-sharpcorner.com/uploadfile/rohatash/dropdownlist-with-country-state-and-city-in-asp-net/
try it .