title: MVC4 URL action with url parameters
body: <p>So i have a print this view button on jquery full calendar that takes the date ranges that are in the current view and generates a more printer friendly version of calendar. this is the beginning of controller.</p>
  
  <pre><code>        public ActionResult PrintableCalendar(string start, string end)
      {
          DateTime StartTime = Convert.ToDateTime(start);
          DateTime EndTime = Convert.ToDateTime(end);
          EndTime = EndTime.AddDays(-1);
  
  
          ClientContext clientContext = new ClientContext(WebConfigurationManager.AppSettings["SPSite"]);
          Web site = clientContext.Web;
  </code></pre>
  
  <p>This is the button thats on the initial calendar</p>
  
  <pre><code>&lt;input type="button" id="PrintView" name="PrintView" value="Print This View" /&gt;
  </code></pre>
  
  <p>this is the click function of the button.
          
          $('#PrintView').click(function () {
              var currentCalendarView = $('#calendar').fullCalendar("getView");
              var startDate = currentCalendarView.visStart;
              var endDate = currentCalendarView.visEnd;
              window.open(@Url.Action("PrintableCalendar", "OnCall", new{start=startDate.toString(), end=endDate.toString()}));
          });
      </p>
  
  <p>UPDATE...this is being called initially in the same view to generate the calendar</p>
  
  <pre><code> &lt;script type='text/javascript'&gt;
  
      $(document).ready(function() {
  
          $('#calendar').fullCalendar({
              editable: true,
              data: JSON.stringify(),
              eventRender: function(event, element) {
                  element.find('span.fc-event-title').html(element.find('span.fc-event-title').text());
              },
              events: "@(Url.Action("GetEvents", "OnCall"))",
              header: {
                  left: 'prev,next today',
                  center: 'title',
                  right: 'month,agendaWeek,agendaDay'
              },
  
  
              loading: function(bool) {
                  if (bool) $('#loading').show();
                  else $('#loading').hide();
              }
  
          });
  
      });
  
  &lt;/script&gt;
  </code></pre>