title: Orchard - Ajax displaying just partial view
body: <p>I am working on an Orchard project and I am trying to get my ajax code working in there.</p>
  
  <p>Here is the view:</p>
  
  <pre><code>    @model Ignite.Events.ViewModels.EventListPartViewModel
  @{
      Script.Require("jQuery");
      Script.Include("EventList.js").AtLocation(Orchard.UI.Resources.ResourceLocation.Foot);
      Script.Include("fullcalendar.js").AtLocation(Orchard.UI.Resources.ResourceLocation.Foot);
      Script.Include("EventCalendar.js").AtLocation(Orchard.UI.Resources.ResourceLocation.Foot);
      Script.Include("jquery.unobtrusive-ajax.js").AtLocation(Orchard.UI.Resources.ResourceLocation.Foot);
      Style.Include("fullcalendar.css").AtLocation(Orchard.UI.Resources.ResourceLocation.Foot);
  }
  
  @using (Ajax.BeginForm("GetEventListItems", "Events", new { area="Ignite.Events", month = 4, year = 2013 }, new AjaxOptions { UpdateTargetId = "event-list", HttpMethod = "GET", InsertionMode = InsertionMode.Replace}, new { id = "ajaxForm" }))
  {
      @Html.AntiForgeryToken();
      &lt;input type="submit" value="Get Next" /&gt;
  }
  &lt;table id="event-list" class="event-list"&gt;
      @Html.Partial("_EventList", Model.Events)
  &lt;/table&gt;
  
  &lt;div id="calendar" class="clear"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Here is a controller that is returning the partial view:</p>
  
  <pre><code>[ValidateAntiForgeryToken]
          public PartialViewResult GetEventListItems(int? month, int? year)
          {
              if (month == null || year == null)
              {
                  month = DateTime.Now.Month;
                  year = DateTime.Now.Year;
              }
  
              var result = _eventListDataService.GetEventListItems((int) month, (int) year);
  
              return PartialView("_EventList", result);
          }
  </code></pre>
  
  <p>I am wondering why I always get just the partial view and not the complete view with the partial view rendered in it.</p>
  
  <p>Thank you,</p>
  
  <p>Jakub</p>