title: ASP.NET MVC 3 jQuery fullCalendar
body: <p>I am trying to implement jquery full calendar with json event updates. I have no idea why oit's not working. Her is my layout.cstml head</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;@ViewBag.Title&lt;/title&gt;
  &lt;link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /&gt;
  &lt;script src="../../Scripts/fullcalendar.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="../../Scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"&gt;        &lt;/script&gt;
  &lt;script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;link href="../../Content/fullcalendar.css" rel="stylesheet" type="text/css" /&gt;
  &lt;link href="../../Content/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css"    /&gt;
  
  
  
   &lt;/head&gt;
  </code></pre>
  
  <p>Here is my index.cshtml</p>
  
  <pre><code>@{
  ViewBag.Title = "Home Page";
  }
  
  
   &lt;h2&gt;@ViewBag.Message&lt;/h2&gt;
   &lt;p&gt;
  To learn more about ASP.NET MVC visit &lt;a href="http://asp.net/mvc" title="ASP.NET    MVC     Website"&gt;http://asp.net/mvc&lt;/a&gt;.
   &lt;/p&gt;
  
     &lt;script type="text/javascript"&gt;
       $(document).ready(function () {
       $('#calendar').fullCalendar({
              events: "/Home/CalendarData"
          });
      });  
     &lt;/script&gt;
  
    &lt;div id="calendar"&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>And my controller</p>
  
  <pre><code> using System;
   using System.Collections.Generic;
   using System.Linq;
   using System.Web;
   using System.Web.Mvc;
   using MvcApplication4.Models;
  
   namespace MvcApplication4.Controllers
    {
     public class HomeController : Controller
     {
      public ActionResult Index()
      {
          ViewBag.Message = "Welcome to ASP.NET MVC!";
  
          return View();
      }
  
      public ActionResult About()
      {
          return View();
      }
  
  
      [HandleError]
  
          public ActionResult CalendarData()
          {
              IList&lt;CalendarDTO&gt; tasksList = new List&lt;CalendarDTO&gt;();
  
              tasksList.Add(new CalendarDTO
              {
                  id = 1,
                  title = "Google search",
                  start = ToUnixTimespan(DateTime.Now),
                  end = ToUnixTimespan(DateTime.Now.AddHours(4)),
                  url = "www.google.com"
              });
              tasksList.Add(new CalendarDTO
              {
                  id = 1,
                  title = "Bing search",
                  start = ToUnixTimespan(DateTime.Now.AddDays(1)),
                  end = ToUnixTimespan(DateTime.Now.AddDays(1).AddHours(4)),
                  url = "www.bing.com"
              });
  
              return Json(tasksList);
          }
  
          private long ToUnixTimespan(DateTime date)
          {
              TimeSpan tspan = date.ToUniversalTime().Subtract(
           new DateTime(1970, 1, 1, 0, 0, 0));
  
                return (long)Math.Truncate(tspan.TotalSeconds);
          }
         }
     }
  </code></pre>
  
  <p>I'm getting nothing in my view. Any suggestions? Thanks in advance!</p>