title: Pass model object back to controller from partial on ui dialog
body: <p>I have an edit details form that is displayed as a partial on a jquery ui dialog. I want to commit amendments back to the database, but I have run in to trouble using the standard submit button used on MVC3 edit forms.. I want to commit the change, but remain on the dialog.</p>
  
  <p>I have put button on the page that is calling a bit of jquery (below). What I need to know is how I can serialize my model (called Models.User) and pass that back to the controller. </p>
  
  <p>As you can see I have the majority of the jquery in place - all I need to do is serialize and data and send it. I am guessing I will need to use Json, but im not 100% on how to bring that in. </p>
  
  <p>Any help appreciated..</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(e) {
          $(function() {
              $("#quickButton1").live("click", function (e) {
                  e.preventDefault();
                  $.ajax({
                      url: "/Users/QuickEditSave/",
                      data: ({}),                  
                      success: function (data) {
                          uiDialog.close();
                      },
                      error: function(xhr, ajaxOptions, thrownError) {
                          alert(xhr.responseText);
                      }
                  });
              });
          });
      });    
  &lt;/script&gt;
  </code></pre>