9/19/13 Anup Das Gupta's blog: Full Calendar with JSON data source using asp.net web service/ pagemethod/ webmethod growingtech.blogspot.in/2012/02/full-calendar-with-json-data-source.html 1/5 Exploring Asp.net, Asp.net MVC, C#, jQuery, HTML, CSS, JavaScript Anup Das Gupta's blog WEDNESDAY, FEBRUARY 1, 2012 Full Calendar with JSON data source using asp.net web service/ pagemethod/ webmethod In this blog post we are going to discuss using full calendar plugin with JSON data source through asp.net webservice / pagemethod / webmethod. We can get the detail of the plugin here. For using this plugin we need to add the reference of the following files- Basic style HTML infrastructure using for this implementation is as follows- #loading { width: 600px; height: 550px; position: absolute; background-color: gray; color: white; text-align: center; vertical-align: middle; display: table-cell; } #fullcal { width: 600px; height: 600px; position: absolute; display: none; } In the div with id fullcal we will be loading the calendar control. By default this div is marked as hidden, and a place holder div (with id loading) is added in the place. This is just to show while server data is getting loaded from server. Once the data is loaded on the calendar we will show back the calendar and hide the placeholder. The script used for activating calendar is as follows- Now in full calendar the event object has lots of information. We can get more information about the event object here. Lets represent the event as a C# class as follows- There are many other properties for the event object. For the sack of implementation we are 1 2 3 4 5 < script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" t < script src = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min. < link rel = 'stylesheet' type = 'text/css' href = 'http://arshaw.com/js/fullcalendar- < script type = 'text/javascript' src = 'http://arshaw.com/js/fullcalendar-1.5.2/jqu < script type = 'text/javascript' src = 'http://arshaw.com/js/fullcalendar-1.5.2/ful 1 2 3 4 5 6 7 8 < div > < div id = "loading" > < label style = "top: 50%; position: relative" > loading events .... </ label > </ div > < div id = "fullcal" > </ div > </ div > 1 2 3 4 5 6 7 8 9 $( 'div[id*=fullcal]' ).fullCalendar({ header: { left: 'prev,next today' , center: 'title' , right: 'month,agendaWeek,agendaDay' }, editable: true , events: <b>list of event here</b> }); 1 2 3 4 5 6 7 public class Event { public int EventID { get ; set ; } public string EventName { get ; set ; } public string StartDate { get ; set ; } public string EndDate { get ; set ; } } Like 25 people like this. Be the first of your friends. Join this site w ith Google Friend Connect Members (19) Already a member? Sign in FOLLOWERS Follow @me Microsoft Community Contributor 2011 MICROSOFT COMMUNITY CONTRIBUTOR 2011 CHAT WITH ME ON SKYPE ajax (17) Asp.net (14) C# (6) data (5) database (4) CATEGORIES 6 .0 (1 ) :contains (1 ) addEventListener (1 ) ajaxcontroltoolkit (1 ) ajaxdatasource (1 ) amazon (1 ) A pplication (1 ) a rra y (2) ArrayList (1 ) attachEvent (1 ) backgroundcolor (1 ) bar (2) bargraph (1 ) beforeShowDay (1 ) Block (1 ) bucket (1 ) button (1 ) calendar (1 ) calendarextender (1 ) calender (1 ) change (1 ) chat (1 ) chechbox (1 ) check (1 ) class (1 ) client validation (1 ) clientid (1 ) clone (1 ) cloud (1 ) column (2) columntotal (1 ) complex (3) complexdata (3) conditional (1 ) conditionalif (1 ) contains (1 ) content-disposition (1 ) Content-Length (1 ) ContentType (1 ) context (1 ) contextmenu (2) contrller (1 ) control (1 ) copy (2) create (1 ) css (1 ) CST (1 ) databasedriven (2) DataList (1 ) datasource (1 ) datatable (3) datatable.net (3) date (1 ) datepicker (2) dayClick (1 ) debugging (2) detail (2) developer (2) developertool (1 ) dialog (3) Dictionary (1 ) disable (1 ) DOM (1 ) dotnet (2) draggable (1 ) driven (3) dropdown (1 ) droppable (1 ) duplicate (1 ) dynamic (2) each (1 ) Enterprise (1 ) Entity (1 ) event (1 ) example (1 ) excel (2) export (1 ) extender 0 Share More Next Blog» Create Blog Sign In ? ? ? ?
5
Embed
Anup Das Gupta's Blog_ Full Calendar With JSON Data Source Using ASP
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
9/19/13 Anup Das Gupta's blog: Full Calendar with JSON data source using asp.net web service/ pagemethod/ webmethod
public class Event{ public int EventID { get; set; } public string EventName { get; set; } public string StartDate { get; set; } public string EndDate { get; set; }}
Like 25 people like this. Be the first of your
friends.
Join this sitew ith Google Friend Connect
Members (19)
Already a member? Sign in
FOLLOWERS
Follow @me
Microsoft Community Contributor 2011
MICROSOFT COMMUNITY CONTRIBUTOR2011
CHAT WITH ME ON SKYPE
ajax(17)
Asp.net (14)
C# (6)
data (5) database (4)
CATEGORIES
6.0 (1) :contains (1) addEventLis tener (1)
ajaxcontroltoolkit (1) ajaxdatasource (1)
amazon (1) A pplication (1) array (2) A rrayLis t (1)
attachEvent (1) backgroundcolor
(1) bar (2) bargraph (1) beforeShowDay (1) Block
(1) bucket (1) button (1) calendar (1)
calendarextender (1) calender (1) change (1) chat
(1) chechbox (1) check (1) c lass (1) c lient
validation (1) c lientid (1) c lone (1) c loud (1) column