title: Upload file using jquery dialog not working
body: <p>i want to upload file using jquery dialog.
  I have created a partial view and showing that partial view in the dialog.</p>
  
  <p>The problem is, when I directly browse the partial view and upload a file, it works perfect.
  BUT when I put the partial view inside a jquery dialog, it submits the form, but don't submits the file. So i have null value.
  I really dont understand what is the difference here!!</p>
  
  <p>Hope someone can help me to identify the problem.</p>
  
  <p>here is some codes;</p>
  
  <p>jquery codes:</p>
  
  <pre><code>$('#UploadDialog').dialog({
          autoOpen: false,
          width: 580,
          resizable: false,
          modal: true,
          open: function (event, ui) {
          $(this).load('@Url.Action("Upload","Notes")');
          },
          buttons: {
              "Upload": function () {
                  $("#upload-message").html(''); 
                  $("#noteUploadForm").submit();
              },
              "Cancel": function () {
                  $(this).dialog("close");
              }
          }
      });
      $(".uploadLink").click(function () {
          $('#UploadDialog').dialog('open');
          });
          return false;
  });
  </code></pre>
  
  <p>partial view:</p>
  
  <pre><code>@using (Ajax.BeginForm("Upload", "Notes", null, new AjaxOptions
  {
  UpdateTargetId = "upload-message",
  InsertionMode = InsertionMode.Replace,
  HttpMethod = "POST",
  OnSuccess = "uploadSuccess"
  }, new { id = "noteUploadForm" , enctype="multipart/form-data"}))
  {
  &lt;div&gt;
  &lt;div id="upload-message"&gt;&lt;/div&gt;
  &lt;div class="editLabel"&gt;
      @Html.LabelFor(m =&gt; m.Notes.NoteTitle)
  &lt;/div&gt;
  &lt;div class="editText"&gt;
      @Html.TextBoxFor(m =&gt; m.Notes.NoteTitle)
  &lt;/div&gt;
  &lt;div class="clear"&gt;&lt;/div&gt;
  
  &lt;div class="editLabel"&gt;
      @Html.Label("Upload file")
  &lt;/div&gt;
  &lt;div class="editText"&gt;
      &lt;input type="file" name="file" /&gt;(100MB max size)
  &lt;/div&gt;
  
  &lt;/div&gt;
  }
  </code></pre>