Click here to Skip to main content
15,923,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

This line showing error of "object reference is not set"

IEnumerable<SelectListItem> stateList = (from m in _db.race_refs select m).AsEnumerable().Select(m => new SelectListItem() { Text = m.race_abbrev, Value = m.race_ref_id.ToString() });

please let me know

Thanks
Srishti
Posted
Comments
[no name] 2-Jul-14 7:30am    
Let you know what? Debug your code and find the object that you are trying to use that is null.
srishti_ 2-Jul-14 7:41am    
i had already debug my code and this line showing error how can i check which object is null
[no name] 2-Jul-14 7:53am    
I usually use the visualizer built into the Visual Studio debugger. I could have sworn you just said you debugged it.

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