title: How to use jQuery UI autocomplete in asp.net
body: <p>I'm starter in jQuery UI, I Want to Use autocomplete jQuery UI , I write this Code:</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
          $(function () {
  
  
  
              $("#Text1").autocomplete({
                  source: function (request, response) {
                      $.ajax({
                          url: "Handler.ashx",
                          dataType: "json",
                          data: { term: request.term },
                          contentType: "application/json; charset=utf-8",
                          dataFilter: function (data) { return data; },
                          success: function (data) {
  
                              response($.map(data.d, function (item) {
                                  return {
                                      label: item.Label,
                                      value: item.Value
  
                                  }
                              }))
                          },
                          error: function (XMLHttpRequest, textStatus, errorThrown) {
                              alert(textStatus);
                          }
                      });
                  },
                  minLength: 1
              });
          }); 
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>and Html Code:</p>
  
  <pre><code>  &lt;input id="Text1" type="text" /&gt;
  </code></pre>
  
  <p>and AutoCompleteHandler:</p>
  
  <pre><code>public void ProcessRequest(HttpContext context)
  {
  
      List&lt;Customer&gt; cuslist = new List&lt;Customer&gt;();
      Customer cus = new Customer(1, "Mohsen");
      cuslist.Add(cus);
      cus = new Customer(2, "aa");
      cuslist.Add(cus);
  
      cus = new Customer(3, "bcb");
      cuslist.Add(cus);
  
      cus = new Customer(4, "cac");
      cuslist.Add(cus);
  
      cus = new Customer(5, "daad");
      cuslist.Add(cus);
  
      cus = new Customer(6, "ffaa");
      cuslist.Add(cus);
  
      cus = new Customer(7, "vvaav");
      cuslist.Add(cus);
  
      string name = context.Request.QueryString["term"];
      var items = cuslist.Where(c =&gt; c.Name.Contains(name));
      var list = new List&lt;AutoComplete&gt;();
      foreach (var item in items)
      {
          var i = new AutoComplete {Id = item.Id, Label = item.Name, Value = item.Name};
          list.Add(i);
      }
      string ss = JsonConvert.SerializeObject(list);
      context.Response.Write(ss);
  }
  </code></pre>
  
  <p>and AutoComplete Class:</p>
  
  <pre><code>public class AutoComplete
  {
      public int Id { get; set; }
      public string Label { get; set; }
      public string Value { get; set; }
  
  }
  </code></pre>
  
  <p>and Customer Class </p>
  
  <pre><code>public class Customer
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public Customer(int id,string name)
      {
          Id = id;
          Name = name;
      }
  }
  </code></pre>
  
  <p>but when write in textBox not work but data send from to client is true </p>
  
  <p><img src="https://i.stack.imgur.com/kMZLw.jpg" alt="enter image description here"></p>
  
  <p>but Data Don't show.please Help me. Thanks all</p>