hello i hope this works for you.. used instead this
List<Student> lstStd = new List<Student>() { new Student()
{ stdId = 103, stdName = "bharath", dept = "CSE" },
new Student() { stdId = 104, stdName = "Hari", dept = "IT" } };
use
List<Student> lstStd = new List<Student>() ;
lstStd.add(
{ new Student()
{ stdId = 103, stdName = "bharath", dept = "CSE" }});
lstStd.add(
new Student() { stdId = 104, stdName = "Hari", dept = "IT" }} );
return View(lstStd);
if this not work then please give me comment what is happen...
ok