Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have ddlCountryDropdown which display country name. I have table tblCountry which has coulmn name CountryName which i want to bind to ddlCountryDropdown at page load event.I am create one folder DTO in that i add class file MasterDTO.Cs in that i write beloqw code using entity framework.

XML
public List<tblCountry> GetCountries()
       {

           List<tblCountry> d = null;
           using (var context = new HealthEntities())
           {
               d = context.tblCountries
                   .ToList<tblCountry>();

           }

           return d;
       }

In Default.aspx.cs how can i bind ddlCountryDropdown.
Posted

1 solution

You can always use google to find answers to these basic questions.. This will help save your and our time Check here[^]
 
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