title: BlueImp/jQuery file upload
body: <p>I have a ASP.NET/C# application that I am developing. I am using <a href="http://blueimp.github.io/jQuery-File-Upload/index.html" rel="nofollow">BlueImp File Uploader</a> to try to upload a file to my ASHX handler. Everything is working fine. What the ASHX handler is doing is its storing the image in a SQL Server database. </p>
  
  <p>My problem is, when my handler gets executed, it needs to pass along an ID with it, so it knows what record to store the image in. Right now, my form is all client side/ajax, so there are no postbacks. I'd like to keep it that way, if possible. </p>
  
  <p>Here is the code I'm using to call the handler:</p>
  
  <pre><code>         $('#fileupload').fileupload({
              url: 'W9UploadHandler.ashx',
              dataType: 'json',
              done: function (e, data) {
                  $.each(data.result.files, function (index, file) {
                      $('&lt;p/&gt;').text(file.name).appendTo('#files');
                  });
              },
              progressall: function (e, data) {
                  var progress = parseInt(data.loaded / data.total * 100, 10);
                  $('#progress .bar').css(
                      'width',
                      progress + '%'
                  );
              }
          });
  </code></pre>
  
  <p>My ID, right now, is stored in a hidden div. I can access it like so:</p>
  
  <pre><code>var id = $('#divHostApplicationId').text();
  </code></pre>
  
  <p>How do I pass this ID onto my ASHX handler? I know I could pass it on as a query parameter with the 'url' parameter, but it seems Blueimp doesn't allow you to dynamically change the url. Once its set, it seems to be set forever. Any ideas?</p>