title: MVC3 (Razor) Passing Model Data from View to Controller
body: <p>I need to know if there is a way to pass the Model (or a part of it, i.e. thereafter a search query) data of a View (Razor Engine) to a Controller.</p>
  
  <p>To explain in a better way what I have to do, that's the interested code:</p>
  
  <p>VIEW:</p>
  
  <pre><code>@model IEnumerable&lt;MvcMovie.Models.Movie&gt;
  
  @{
      ViewBag.Title = "Index";
  }
  
  &lt;h2&gt;Index&lt;/h2&gt;
  
  ...
  @foreach (var item in Model) { ...}
  ...
  
  @Html.ActionLink("Search", "SearchIndex")
  @Html.ActionLink("Create Document", "createDoc"/*, new { id = Model.ToList() }*/)
  </code></pre>
  
  <p>I want to pass the</p>
  
  <pre><code>@model IEnumerable&lt;MvcMovie.Models.Movie&gt;
  </code></pre>
  
  <p>in the first line (= Model used in the foreach instruction) to the Controller "createDoc" to create a report document dynamically binded with the view.</p>
  
  <p>I tried everything: I tried to use a ViewData (VIEW: ViewData["data"]=Model , CONTROLLER List movies= ViewData["data"]), I similarly tried a TempData, I tried to pass the Model as routeValues in the ActionLink (as you can see: new{ id= Model.toList() }), but nothing worked.</p>
  
  <p>Is it even possible to do the thing I want to?</p>
  
  <p>Can anyone help me?</p>