How solve this Exception
Model.nationalitys= 'Model.nationalitys' threw an exception of type 'System.NullReferenceException'
this exception appear in these Codes :
View model class is :View model class is :
Model is:


Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Nilesh ShahRank #42 · 34.2K reputationPosted Jan 5, 2018, 4:20 AM EST
Abdulmajeed AlshariRank #7,641 · 237 reputationPosted Jan 5, 2018, 4:25 AM EST
Nilesh ShahRank #42 · 34.2K reputationPosted Jan 5, 2018, 5:32 AM EST
Abdulmajeed AlshariRank #7,641 · 237 reputationPosted Jan 5, 2018, 8:08 AM EST
Nilesh Shah
return View(ob);