I\'m not able to bind my dropdownlist present in edititem template . I am getting null reference when i try to access it.
My design:
I do it like this. In which, Name and Id are two fields of Company object:
HTML Code:
C# code behind:
protected IEnumerable PopulateddlCompanyEdit() { using (var bkDb = new BrickKilnDb()) { return bkDb.Companies.ToList(); } }