Hierarchical display of DB data in ASP.NET MVC c# -
i trying obtain information multiple tables , display data in hierarchical view. have following tables:
- track_info
- gen_ed_head
- gen_ed_sub_head
- gen_ed_sub_sub_head
- gen_ed_course
- core_head
- core_sub_head
- core_sub_sub_head
- core_course
i need first display 1 record track info, display each record of gen_ed_head each gen_ed_sub_head listed under respective head , gen_ed_sub_sub_head listed under , gen_ed_course listed.
i know how not in mvc. here example of looping (hierarchy) looking for:
foreach(track in track_info) { display track info foreach(genedhead in gen_ed_head) { display gen_ed_head info foreach(henedsubhead in gen_ed_sub_head) { display gen ed sub head info foreach (genedsubsubhead in gen_ed_sub_sub_head) { display gen ed sub sub head info foreach(course in gen_ed_course) { display gen ed course info } } } } }
Comments
Post a Comment