Я использую jquery fullcalendar в своем приложении asp.net.Пожалуйста, см. code- ASPX code
$('#calendar').fullCalendar({
editable: true,
events: "SchedulerJsonResponse.ashx",
eventDrop: function(event, delta) {
alert(event.title + ' was moved ' + delta + ' days\n' +
'(should probably update your database)');
},
loading: function(bool) {
if (bool) $('#loading').show();
else $('#loading').hide();
}
});
SchedulerJsonResponse.ashx-
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "application/json";
string res = scheduleTest.getAllScheduledSessionsOfLocation();
context.Response.Write(res);
context.Response.Flush();
context.Response.Close();
}
В приведенном выше коде scheduleTest.getAllScheduledSessionsOfLocation()
метод возвращает foll.string to handler -
[{title: 'Puneet sdfsdfsdf',allDay:false,start: '02/20/2012 1:30:00 PM',end: '02/20/2012 2:00:00 PM'},{title: 'abc xyz',allDay:false,start: '03/05/2012 6:00:00 AM',end: '03/05/2012 6:00:00 AM'},{title: 'bhuvana ',allDay:false,start: '03/07/2012 7:30:00 PM',end: '03/07/2012 7:30:00 PM'},{title: 'bhuvana ',allDay:false,start: '03/12/2012 2:00:00 PM',end: '03/12/2012 2:00:00 PM'},{title: 'abc xyz',allDay:false,start: '03/12/2012 6:00:00 AM',end: '03/12/2012 6:00:00 AM'},{title: 'bhuvana ',allDay:false,start: '03/14/2012 7:30:00 PM',end: '03/14/2012 7:30:00 PM'},{title: 'bhuvana ',allDay:false,start: '03/19/2012 2:00:00 PM',end: '03/19/2012 2:00:00 PM'},{title: 'abc xyz',allDay:false,start: '03/19/2012 6:00:00 AM',end: '03/19/2012 6:00:00 AM'},{title: 'bhuvana ',allDay:false,start: '03/21/2012 7:30:00 PM',end: '03/21/2012 7:30:00 PM'},{title: 'bhuvana ',allDay:false,start: '03/26/2012 2:00:00 PM',end: '03/26/2012 2:00:00 PM'},{title: 'abc xyz',allDay:false,start: '03/26/2012 6:00:00 AM',end: '03/26/2012 6:00:00 AM'},{title: 'bhuvana ',allDay:false,start: '03/28/2012 7:30:00 PM',end: '03/28/2012 7:30:00 PM'},{title: 'bhuvana ',allDay:false,start: '04/02/2012 2:00:00 PM',end: '04/02/2012 2:00:00 PM'},{title: 'abc xyz',allDay:false,start: '04/02/2012 6:00:00 AM',end: '04/02/2012 6:00:00 AM'},{title: 'bhuvana ',allDay:false,start: '04/04/2012 7:30:00 PM',end: '04/04/2012 7:30:00 PM'},{title: 'bhuvana ',allDay:false,start: '04/09/2012 2:00:00 PM',end: '04/09/2012 2:00:00 PM'},{title: 'abc xyz',allDay:false,start: '04/09/2012 6:00:00 AM',end: '04/09/2012 6:00:00 AM'},{title: 'bhuvana ',allDay:false,start: '04/11/2012 7:30:00 PM',end: '04/11/2012 7:30:00 PM'},{title: 'bhuvana ',allDay:false,start: '04/16/2012 2:00:00 PM',end: '04/16/2012 2:00:00 PM'},{title: 'abc xyz',allDay:false,start: '04/16/2012 6:00:00 AM',end: '04/16/2012 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '03/24/2014 6:00:00 AM',end: '03/24/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '03/31/2014 6:00:00 AM',end: '03/31/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '04/07/2014 6:00:00 AM',end: '04/07/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '04/14/2014 6:00:00 AM',end: '04/14/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '04/21/2014 6:00:00 AM',end: '04/21/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '04/28/2014 6:00:00 AM',end: '04/28/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '05/05/2014 6:00:00 AM',end: '05/05/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '05/12/2014 6:00:00 AM',end: '05/12/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '05/19/2014 6:00:00 AM',end: '05/19/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '05/26/2014 6:00:00 AM',end: '05/26/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '06/02/2014 6:00:00 AM',end: '06/02/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '06/09/2014 6:00:00 AM',end: '06/09/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '06/16/2014 6:00:00 AM',end: '06/16/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '06/23/2014 6:00:00 AM',end: '06/23/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '06/30/2014 6:00:00 AM',end: '06/30/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '07/07/2014 6:00:00 AM',end: '07/07/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '07/14/2014 6:00:00 AM',end: '07/14/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '07/21/2014 6:00:00 AM',end: '07/21/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '07/28/2014 6:00:00 AM',end: '07/28/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '08/04/2014 6:00:00 AM',end: '08/04/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '08/11/2014 6:00:00 AM',end: '08/11/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '08/18/2014 6:00:00 AM',end: '08/18/2014 6:00:00 AM'},{title: 'rtew ',allDay:false,start: '08/25/2014 6:00:00 AM',end: '08/25/2014 6:00:00 AM'}]
Но в календаре не отображается ни одно событие.Я жестко запрограммировал ответ в fullcalenders, тогда он работал нормально.Пожалуйста, помогите мне решить это.