title: how to send multiple parameter during uploading image using jquery and IHttpHandler in c#
body: <p>i am uploading image using jquery and http handler in c#...i want to send muple valriable in handler with file uploading data..My code is given below..here is my jquery code...</p>
  
  <pre><code>var filename = document.getElementById("&lt;%=fileuploadimages.ClientID %&gt;");
             var files = fileUpload.files;
                  var test = new FormData();
                  for (var i = 0; i &lt; files.length; i++) {
                      test.append(files[i].name, files[i]);
                  }
                  $.ajax({
                      url: "UploadHandler.ashx",
                      type: "POST",
                      contentType: false,
                      processData: false,
                      data: test,
  
                      // dataType: "json",
                      success: function (result) {
                          alert(result);
                      },
                      error: function (err) {
                          alert(err.statusText);
                      }
                  }); 
  </code></pre>
  
  <p>here is my handler code for uploading image</p>
  
  <pre><code>public void ProcessRequest(HttpContext context)
          {
              if (context.Request.Files.Count &gt; 0)
              {
                  HttpFileCollection files = context.Request.Files;
                  for (int i = 0; i &lt; files.Count; i++)
                  {
                      HttpPostedFile file = files[i];
                      string fname;
                      if (HttpContext.Current.Request.Browser.Browser.ToUpper() == "IE" || HttpContext.Current.Request.Browser.Browser.ToUpper() == "INTERNETEXPLORER")
                      {
                          string[] testfiles = file.FileName.Split(new char[] { '\\' });
                          fname = testfiles[testfiles.Length - 1];
                      }
                      else
                      {
                          fname = file.FileName;
                      }
                      fname = Path.Combine(context.Server.MapPath("~/UserImage/"), fname);
                      file.SaveAs(fname);
                  }
              }
              context.Response.ContentType = "text/plain";
              context.Response.Write("File Uploaded Successfully!");
          }
  
  
          public bool IsReusable
          {
              get
              {
                  return false;
              }
          }
  </code></pre>
  
  <p>every thing is working fine my problem is that i want to send an another variable with test..like var a="xxx"..i want to send the a variable also with test..how to do this???can any one help me please??</p>