Null reference exception

Posted by Prasanna64 under ASP.NET AJAX on 5/9/2012 | Points: 10 | Views : 1563 | Status : [Member] | Replies : 0
i got an error null reference exception was unhandled by unuser code.iam developing an application in mvc 3
my controller code
public ActionResult Index()
ViewBag.Message = "Welcome to ASP.NET MVC!";
var de =

from i in dbContext.Usr_trainings
where i.Usr_training_id == 1
select i;

return View(de);
my view code

@model IEnumerable<OpenAccessModel1.Usr_training>

i give this reference
and retrieve the data using

@foreach (var item in Model)



(No response found.)

Login to post response