sql - AJAX filled pulldown shows 5 identical options when there are 5 different options in database -



sql - AJAX filled pulldown shows 5 identical options when there are 5 different options in database -

scratching head here. i've got pulldown , if query in sql server manager query window 5 different values (these sample points water system).

however, when pulldown loads, there 5 options of first value. can see can't?

i narrowed downwards code below because held cursor on "results" final step in controller's code, , showed 5 items of same value:

else if ((sampletype == "p") || (sampletype == "t") || (sampletype == "c") || (sampletype == "a")) { var samplepoints = (from c in _db.tblpws_wsf_spid_isn_lookup c.pws == id && c.wsfstatecode.substring(0, 1) == "s" select c).tolist(); if (samplepoints.any()) { var listitemsbig = samplepoints.select(p => new selectlistitem { selected = false, text = p.wsfstatecode.tostring() + ":::" + p.samplepointid.tostring(), value = p.wsfstatecode.tostring() }).tolist(); results = new jsonresult { info = listitemsbig }; } } homecoming results ; }

i have had similar problem in nhibernate, caused how defined primary keys/foreign keys in orm, leading bad bring together , duplicate values.

sql ajax linq controller

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -