asp.net - List not populating dropdown -


i using standard list method lookups use winforms , works fine trying re use on web , not displaying items.

    public list<sislookuplists> getgender()     {         list<sislookuplists> lookups = new list<sislookuplists>();          try         {             var q = lookup in schoolentities.genders                     orderby lookup.description                     select new                     {                         code = lookup.code,                         description = lookup.description.trim()                     };              if (q != null)             {                 array.foreach(q.toarray(), l =>                 {                     lookups.add(new sislookuplists(l.code, l.description));                 });             }         }         catch (exception ex)         {             throw new entitycontextexception("getgender failed.", ex);         }          return lookups;     }          public sisdbcontext _db = new sisdbcontext();          rdgender.datasource = _db.getgender();         rdgender.datatextfield = "description";         rdgender.datavaluefield= "code";                     rdgender.databind();   

any idea doing wrong here guys.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -