[英]How to display data in Jquery Week Calendar from Database
My application is in Asp.net MVC3 coded in c#.Net. 我的应用程序在c#.Net中编码的Asp.net MVC3中。 I'm using Jquery Week Calendar for showing the time slot. 我正在使用Jquery周日历显示时间段。 I have successfully able to use and implement it. 我已经能够成功使用和实施它。 But now i want to show the values on the time slot from the database, which i'm not able to achieve. 但是现在我想显示数据库无法显示的时隙上的值。
Following things i have tried: 以下是我尝试过的事情:
1: Create a function on document.ready
and tried to filled the data to week Calendar data using viewbag. 1:在document.ready
上创建一个函数,并尝试使用Viewbag将数据填充到Week Calendar数据中。
suggest how can i achieve it. 建议如何实现它。
first collect your data from DATABASE
,convert it to JSON
formate then pass it to weekcalender
jquery 首先从DATABASE
收集数据,将其转换为JSON
formate,然后将其传递给weekcalender
jquery
EG: 例如:
here i take static data JSON 在这里我采取静态数据JSON
$('#calendar').fullCalendar({
events: [
{"id":"46_l","title":"CustomEvent-Chargement","start":"2013-12-02","end":"2013-12-03"},
{"id":"46_d","title":"Custom Event-Livraison","start":"2013-12-11","end":"2013-12-12"}
]
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.