title: Problems sending two parameters to mvc4 controller
body: <p>Im trying to send two parameters to my <code>Chapter</code> controller. And then have the model to do some update, and then return to the view I started from.</p>
  
  <p>What I have for now is this:</p>
  
  <hr>
  
  <p><strong>Move.cshtml:</strong></p>
  
  <pre><code>&lt;div&gt;
      &lt;a href='/Chapter/Move?chapterId=27&amp;parentId=26'&gt;Move under this&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>ChapterController.cs:</strong></p>
  
  <pre><code>public ActionResult Move(int chapterId)
  {
      if (chapterId == 0)
      {
          return RedirectToAction("Index", "Home");
      }
  
      var model = new Chapter { _id = chapterId };
  
      return View(model);
  }
  
  public ActionResult UpdateChapterPosition(int chapterId, int parentId)
  {
      Chapter.updateChapterPosition(chapterId, parentId);
  
      return RedirectToAction("Chapter", "Move", new { chapterId = chapterId });
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Chapter.cs: //Model</strong></p>
  
  <pre><code>public int _id { get; set; }
  public int parentId { get; set; }
  
  public static void updateChapterPosition(int chapterId, int parentId)
  {
      var con = new    SqlConnection(ConfigurationManager.ConnectionStrings["Database"].ConnectionString);
      con.Open();
  
      using (var command = new SqlCommand("update Subjects set fk_subfolderTo=@parent where _id=@id", con))
      {
          command.Parameters.AddWithValue("id", chapterId);
          command.Parameters.AddWithValue("parent", parentId);
          command.ExecuteNonQuery();
      }
  }
  </code></pre>
  
  <hr>
  
  <p>It makes a reload of the view. but doesn't update the database. And no error occurs.</p>