Hi i got the following error,
Does somebody now how to fix it ?
model:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Linq;
using System.Web;
namespace TelerikMvcApp1.Models
{
public class ProgramStatus
{
[Key]
public string ProgramName { get; set; }
public DateTime ProgramLastRun { get; set; }
}
{
public class ProgramStatus
{
[Key]
public string ProgramName { get; set; }
public DateTime ProgramLastRun { get; set; }
}
public class ProgramStatusContext : DbContext
{
public DbSet Stats { get; set; }
{
public DbSet
}
}
}
controller:
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using TelerikMvcApp1.Models;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using TelerikMvcApp1.Models;
namespace TelerikMvcApp1.Controllers
{
public class ProgramStatusController : Controller
{
private ProgramStatusContext db = new ProgramStatusContext();
{
public class ProgramStatusController : Controller
{
private ProgramStatusContext db = new ProgramStatusContext();
// GET: ProgramStatus
public ActionResult Index()
{
var waarde = db.Stats.First().ProgramLastRun;
return View();
public ActionResult Index()
{
var waarde = db.Stats.First().ProgramLastRun;
return View();
}
} }
view:
@model TelerikMvcApp1.Models.ProgramStatus
@(Html.Kendo().Calendar().Value(Model.ProgramLastRun) // This gives an error The object is set to an instance of an object (how can i fix it ???)
.Name("Calender")
)
@{
ViewBag.Title = "Index";
}
ViewBag.Title = "Index";
}
@(Html.Kendo().Calendar().Value(Model.ProgramLastRun) // This gives an error The object is set to an instance of an object (how can i fix it ???)
.Name("Calender")
)

Raja TRank #685 · 3.5K reputationPosted Jan 13, 2016, 1:23 AM EST
Cassie ModRank #3,821 · 387 reputationPosted Jan 14, 2016, 2:14 AM EST