Hi Guys I'm trying to display a Json result back to a view i have seen it done in a few tutorials but not working on min as it only display the json result on the page but not as a view I'm not sure where I'm going wrong
my Action in my control:
- public ActionResult Index()
- {
- myContext.Configuration.ProxyCreationEnabled = false;
- myContext.Configuration.LazyLoadingEnabled = false;
- var driver = myContext.Drivers.OrderBy(x => x.firstName).ToList();
- return Json( driver, JsonRequestBehavior.AllowGet);
- }
- @{
- ViewBag.Title = "test";
- }
- @{
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
test
Part 1 : Implement jQuery Datatable in ASP.NET MVC
- "width:90%; margin:0 auto;">
"myTable">
First Name surname BadgeNo - @* Load datatable js *@
- @section Scripts{
- }
P.s I have a relationship between 2 tables all the tutorials I have watched using a single table
thanks in advance

Bikesh SrivastavaRank #108 · 20.3K reputationPosted Jan 28, 2017, 8:35 AM EST
Abbas Hamza87 reputationPosted Jan 28, 2017, 12:45 PM EST