title: Asp.Net MVC Passing an object from Url.Action in View to Controller
body: <p>While there appears to be similar questions I do not believe I found one where somebody was passing the entire model from view to controller, the closest I found was passing a data value in the model  to the controller... which is not what I want to do...</p>
  
  <p>I want to pass the model object to the applicable controller action result as a parameter
  and do what I want to do with the data in the model object from within the controller...</p>
  
  <p>code abbreviated...</p>
  
  <p>in the view i am using Url.Action(string, string, object) to pass the controller method name, and the route to it as the 2nd parameter, and the entire model object as the 3rd parameter...</p>
  
  <p>my third parameter is the problem, the Url.Action(string, string) over load works fine with the same values, so I don't have any problem getting to the controller action result method, with the values I am using...</p>
  
  <p>view code snippet...</p>
  
  <pre><code>$('#ControllerActionResult').click(function (e) {
    window.location = '&lt;%: Url.Action("ControllerActionResult", TheRoute, new { pModel = Model } ) %&gt;';
  });
  </code></pre>
  
  <p>controller code snippet...</p>
  
  <pre><code>public ActionResult ControllerActionResult(object pModel)
  {
  }
  </code></pre>
  
  <p>My error is "CS1502: The best overloaded method match for 'System.Web.Mvc.UrlHelper.Action(string, string, object)' has some invalid arguments" and the window location line is highlighted...</p>
  
  <p>Am I missing something obvious?</p>