title: Pass parameter from MVC view to an action with jQuery
body: <p>I want to pass a parameter from a view to an action through the following jQuery code, but I don't succeed to pass the parameter. Am I missing something?</p>
  
  <pre><code>$('li').click(function () {  
  employeeID = $(this).attr('id');    
  window.location.href = '/ApproveWork/GetEmployeeDays/'+employeeID; 
  });
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>[HttpGet]
  public ActionResult GetEmployeeDays(string userCode)
  {
       .....
      return View("GetEmployeeDays", model);
  }
  </code></pre>
  
  <p>routing from Global.asax </p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes)
   {
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
             new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
          );          
    }
  </code></pre>
  
  <p>P.S. I tried to use AJAX jQuery function, but this doesn't return me the view that I specified in the Action.</p>