I have User into my application and each user has assigned (District,Tehsil,UC,Villages) these are cascade in nature means
1-District contains tehsils
2-Tehsil contains ucs
3-Ucs contains villages
Now i have place checkboxes and they are populating right based on selected , but when i de select or select another districts the previous checkbox result set lost due to post back.
My second question please suggest me a database structure for that
Loading


Jitendra KumarRank #760 · 3K reputationPosted Jan 12, 2015, 12:23 AM EST
Kindly share code file for better understanding problem.
First, if you select a district then how find tahsil uc village of user.
bcz acc to you district and tahsil have one to many relationship.
Danish HabibRank #2,024 · 715 reputationPosted Jan 12, 2015, 12:36 AM EST
Jitendra KumarRank #760 · 3K reputationPosted Jan 12, 2015, 12:48 AM EST
First, one problem in database that is you maintain a primary foreign relationship in tables so why use district key again and again in the tables.
Tables likes :-
District (districtid,districtname)
Tehsil (district id(F), Tehsilid,tahsilname)
UC (TEhsilID(F),ucid,ucname)
Villages (UCID(F),Viallageid,village name)
And kindly share code for better understanding of problem.
Vikram AgrawalRank #4,713 · 329 reputationPosted Jan 12, 2015, 1:02 AM EST
Maintain your table as @Jitendra explained, and in user table put villageId column.
and one more thing i want to suggest you as you are using server side codes for populating the values based on district so make this in client side then performance of your web page will be increase and also you will not get these problem which are coming due to post backs.
Thanks.