"The request must start in "JSON" string " error occur in asp.net mvc rezor c# schedule deleopment
13 years ago.
Hi ,
I have a serious error occur when i run the application using daypilot mvc rezor source code. I follow this link "http://kb.daypilot.org/67316/how-to-show-an-event-calendar-in-asp-net-mvc-3-razor/" to create my project.
The error occurs in the controller Index(). the function is
public ActionResult Index()
{
return new Dpc().CallBack(this);
}
class Dpc : DayPilotCalendar
{
protected override void OnInit(InitArgs e)
{
var db = new DataClasses1DataContext();
Events = from ev in db.events select ev;
DataIdField = "id";
DataTextField = "text";
DataStartField = "eventstart";
DataEndField = "eventend";
Update();
}
}
And my Index page source code is
@using DayPilot.Web.Mvc
@using DayPilot.Web.Mvc.Events.Calendar;
@using DayPilot.Web.Mvc.Enums.Calendar;
@{
ViewBag.Title = "Index";
}
<h2>Schedule</h2>
<script src="@Url.Content("~/Scripts/DayPilot/Common.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/DayPilot/Calendar.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/DayPilot/calendar.src.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/DayPilot/common.src.js")" type="text/javascript"></script>
@Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig
{
BackendUrl = Url.Content("~/Schedule/Index"),
EventMoveHandling = EventMoveHandlingType.CallBack
})
I also attached the two jpg file to see what happens.
DayPilot