title: AutoComplete Textbox with database
body: <p>I wanna do autocomplete when i enter a letter.
  I have a database "USERS" and  it has name .When i try texted for example e 
  it must show "edgar,edwin,emir" but ,t shows nothing.
  ClientController here:</p>
  
  <pre><code> public class ClientController : Controller
  {
      public JsonResult AutocompleteSuggestions(string searchstring)
      {
          ModelContext  db = new ModelContext();
  
          var suggestions = from E in db.USERS
                            select E.Name;
  
  
          var namelist = suggestions.Where(n =&gt; n.ToLower().Contains(searchstring.ToLower()));
  
          return Json(namelist, JsonRequestBehavior.AllowGet);
      }
  }
  </code></pre>
  
  <p>index.cshtml here:in here there is a textbox and i send client controller autocopleteSuggeston method but it doesnt go or it doesnt work.I add jquery script file on cshtml but it still not working.</p>
  
  <pre><code>    @using (Html.BeginForm())
  {
  
      &lt;p&gt;
          Name: @Html.TextBox("SearchString")
  
          &lt;input type="submit" value="Search" /&gt;
      &lt;/p&gt;
  }
  
  &lt;script type="text/javascript"&gt;
      window.jQuery(function () {
          window.jQuery("#SearchString").autocomplete({
              source: "/Client/AutocompleteSuggestions",
              minLength: 1,
              select: function (event, ui) {
                  if (ui.item) {
                      window.jQuery("#SearchString").val(ui.item.value);
                      window.jQuery("form").submit();
                  }
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>i add jquery 
  Where is the mistake?</p>