title: How to have a button that sends more than one value back to the ActionResult with jquery?
body: <p>I have this button with which I want to send data back to the ActioResult. I want to send and id and an entity name. The id works fine, but when I also want to send the entity name it does not work. How do I send back multiple variables to the ActionResult? This is my html/javascript:</p>
  
  <pre><code>@model test.Web.Framework.Areas.Administration.Models.TabNotesModel 
  @using (UI.DocumentReadyScript())
  {
      if (Model.meta.id.HasValue)
      {
          UI.jQuery("#tbl" + Model.meta.modelname).flexigrid(Model.Grid);
          }
      }
  &lt;form method="post" action="@Url.Action("TabNotes", new { cmd = "refresh" })"  id="@Model.meta.modelname"&gt;
  &lt;div class="ui-state-highlight ui-corner-all highlight" data-bind="visible: meta.message"&gt;
      &lt;span class="ui-icon ui-icon-info"&gt;&lt;/span&gt;&lt;strong data-bind="text: meta.message"&gt;
      &lt;/strong&gt;
  &lt;/div&gt;
  @using (UI.BeginBlock("Administation.TabNotes", UI.Label("Notes", "Notes").ToString(), test.Web.Framework.Core.enumIcons.pencil, false, false))
  {
      &lt;table id="@("tbl" + Model.meta.modelname)"&gt;
      &lt;/table&gt;
  }
  &lt;/form&gt;
  &lt;script type="text/javascript"&gt;
  (function() {
      $('#load-partial').click(function() {
          $('#partial').load('@Url.Action("CreateNote", "Entity", new {itemId = @Model.meta.id, modelEntity = @Model.meta.entity})');
  // I also tried modelEntity = "Phrase" to test, but that also didn't work
          }); 
      })(); 
  &lt;/script&gt;
  
  &lt;div id="partial"&gt;&lt;/div&gt;
  &lt;button type="button" id="load-partial"&gt;Create Note&lt;/button&gt;
  </code></pre>
  
  <p>and my ActionResult. The modelEntity stays null. The itemId does get the number. </p>
  
  <pre><code>   public ActionResult CreateNote(
          [ModelBinder(typeof(Models.JsonModelBinder))]
          NoteModel Model, string cmd, long? itemId, string modelEntity)
      {
  
          if (cmd == "Save")
          {
              Model.meta.message = "Note saved";
              Entity entity = NotesRepository.GetEntity(modelEntity);
              NotesRepository.StoreNote(Model.subject, Model.text, entity, itemId);
              return RedirectToAction("TabNotes", new { modelEntity = modelEntity, id = itemId});
          }
  
          Model.meta.modelname = "CreateNote";
          Model.meta.JsViewModelType = "EditNoteModel";
          Model.meta.PostAction = Url.Action("CreateNote", new { cmd = "Save", itemId = itemId, modelEntity = modelEntity});
  
  
          return PartialView("CreateNotePartial",Model);
  
          }
  </code></pre>