Hello,
I am following your article on the Open source version of Daypilot Calendar from (https://code.daypilot.org/10607/monthly-event-calendar-for-asp-net-mvc-and-jquery-open-source) but when I build I get an error that the OnInit method is not suitable to override.
I'm using Visual Studio 2015.
This is my Controller Action, I've added the assembly as a reference in my project and added the namespace to the web.config file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Intranet.DataAccess;
using DayPilot.Web.Mvc;
namespace Intranet.Web.Controllers
{
public class CalendarController : Controller
{
// GET: Calendar
public ActionResult Index()
{
return View();
}
public ActionResult Backend()
{
return new Dpm().CallBack(this);
}
class Dpm : DayPilotMonth
{
protected override void OnInit(InitArgs e)
{
var db = new IntranetContext();
Events = from ev in db.Events select ev;
DataIdField = "Id";
DataTextField = "Description";
DataStartField = "StartDate";
DataEndField = "EndDate";
Update();
}
}
}
}