Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
// how can i fill dropdown list in department list,standard list, semester list,stream list when i add subject and chapter  //
i have two different table tbl_dipart and chepter //
// department model//

namespace firstapp.Models
{
    public class dipartment  
    {

        public int dip_id { get; set; }

        public string dipart { get; set; }

        public string std { get; set; }

        public string sem { get; set; }

        public string strem { get; set; }
    }
}
// chapter model//

namespace firstapp.Models
{
    public class chepter
    {
        [ForeignKey("dip_id")]
        public int dipart_id { get; set; }

        public int chep_id { get; set; }

        public string subject { get; set; }

        public string chepter { get; set; }

        public List<dipartment> dipartlist { get; set; }

        public List<dipartment> stdlist { get; set; }

        public List<dipartment> semlist { get; set; }

        public List<dipartment> stremlist { get; set; }


    }
}
//please help me //thank you in advance.....
Posted
Updated 18-Jun-14 3:09am
v2
Comments
[no name] 18-Jun-14 10:17am    
Connect to whatever database you are using, write a query for the information, execute the query, add your query result to your list(s).

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900