title: autocomplete specify more parameters?
body: <p><strong>I'm using jquery UI autocomplete</strong></p>
  
  <p>If I do this in jquery / asp.net:</p>
  
  <pre><code> $("#&lt;%= txtName.ClientID %&gt;").livequery(function () {
                  $(this).autocomplete('LoadNames.ashx')
               .result(function (event, data, formatted) { // data[0] : Name, data[1] :AddressID
                   // Set Selected email ID to hidden field
                   $("#&lt;%= hdnID.ClientID %&gt;").val(data[1]);
                   if (data[1] != "0") {
                       var url = "http://emps/NewEntry.aspx?ID=" + data[1];
                       window.open(url);
                   }
                   else {
                   }
               });
              });
  </code></pre>
  
  <p>This works great, but I want to add more parameters like minChars, etc. so I try this:</p>
  
  <pre><code>$("#&lt;%= txtName.ClientID %&gt;").livequery(function () {
                  $(this).autocomplete({source:"LoadNames.ashx", delay:100, minChars:2})
               .result(function (event, data, formatted) { // data[0] : Name, data[1] :AddressID
                   // Set Selected email ID to hidden field
                   $("#&lt;%= hdnID.ClientID %&gt;").val(data[1]);
                   if (data[1] != "0") {
                       var url = "http://emps/NewEntry.aspx?ID=" + data[1];
                       window.open(url);
                   }
                   else {
                   }
               });
              });
  </code></pre>
  
  <p>This then doesnt work any longer.  How can I add more parameters like minChars, delay, etc to this?</p>
  
  <p>From the comments someone wanted to see the .ashx file, this is it but there is no issue with this.  Its just I want to add additional parameters to autocomplete:</p>
  
  <pre><code> public class LoadNames : IHttpHandler
      {
  
          public void ProcessRequest(HttpContext context)
          {
              DataSet ds = null;
              Dictionary&lt;long, string&gt; lstAddresses = new Dictionary&lt;long, string&gt;();
  
              ds = GetLoginNames();
  
              if (ds.Tables[0].Rows.Count &gt; 0)
              {
                  foreach (DataRow dr in ds.Tables[0].Rows)
                  {
                      lstAddresses.Add(Convert.ToInt64(dr["LoginID"].ToString()), dr["Login"].ToString());
                  }
                  StringBuilder builder = new StringBuilder();
  
                  foreach (KeyValuePair&lt;long, string&gt; item in lstAddresses)
                  {
                      builder.Append(string.Format("{0}|{1}|{2}",
                            item.Value,
                            item.Key,
                            Environment.NewLine));
                  }
                  context.Response.Write(builder.ToString());
              }
          }
  
          public DataSet GetLoginNames()
          {
              SqlCommand cmdSelect = default(SqlCommand);
              SqlConnection conMyData = default(SqlConnection);
              SqlDataAdapter daIssues = default(SqlDataAdapter);
              System.Data.DataSet ds = null;
  
              conMyData = null;
  
              //try and make a connection   
              try
              {
                  conMyData = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["connString"]);
                  cmdSelect = new SqlCommand("selFullNames", conMyData);
  
                  var _with1 = cmdSelect;
                  _with1.CommandType = System.Data.CommandType.StoredProcedure;
                  //add parameters
                  _with1.Parameters.Add("@Inactive", SqlDbType.Int).Value = 2;
                  daIssues = new SqlDataAdapter();
                  daIssues.SelectCommand = cmdSelect;
                  ds = new System.Data.DataSet();
                  daIssues.Fill(ds);
  
                  return ds;
                  //catch any exceptions that might be thrown
              }
              catch (Exception e)
              {
                  throw e;
                  //clean up and close resources
              }
              finally
              {
                  conMyData.Close();
                  cmdSelect = null;
                  conMyData = null;
              }
          }
  
          public bool IsReusable
          {
              get
              {
                  return false;
              }
          }
  </code></pre>