Getting Problem in taking the values from the database

Posted by Prasanna64 under ASP.NET on 5/9/2012 | Points: 10 | Views : 853 | Status : [Member] | Replies : 0
In My controller i write this 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);


In my view
@model IEnumerable<Sampleone.Usr_training>

ViewBag.Title = "Home Page";

To learn more about ASP.NET MVC visit <a href="" title="ASP.NET MVC Website"></a>.
<script type="text/javascript">

var url = '/Home/Index'
$.ajax({ type: "GET",
url: url,

dataType: "json",
error: function (xhr, status, error) {
success: function (json) {
alert("Data Returned: " + json.Usr_training_name);


When i run this i get an parse error

Could not load Sampleone.MvcApplication

please help me if anyone knows


(No response found.)

Login to post response