Return List controller to View and Bind Html Table

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 817
hi
I have post the Code Return List controller to View and Bind Html Table

public ActionResult Index()
{
objCl = lstRec();
return View(objCl.ToList());
}


public List<EmpClass> lstRec()
{
List<EmpClass> lstRemp = new List<EmpClass>();
lstRemp.Add(new EmpClass { Id = 1, Ename = "AAA", Empno = "123456", Amt = 19877 });
lstRemp.Add(new EmpClass { Id = 2, Ename = "BBB", Empno = "750", Amt = 96358 });
return lstRemp;
}

Comments or Responses

Login to post response