1

I have get error - please can anyone help?

Object reference not set to an instance of an object.

My code:

public ActionResult Detail()
{
    //this list stored data selection to Compare Between them //
    List<com> list = (List<com>)Session["com"];

    // the specsat List to Display detial of data  based on data in <list> 
    List<specsat> spe = new List<specsat>();

    foreach (var co in list)
    {
       spe.Add(new specsat(db.Specs.Find(co.Ct.id)));
    }

    return View(spe.ToList());
}
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Ahmed Gad
  • 11
  • 2

0 Answers0