title: using jquery autocomplete difficulty
body: <p>I am using jquery autocomplete but having dificulty to load the autocomplete in the textbox</p>
  
  <p>My model is as follows:</p>
  
  <pre><code>Users = new List&lt;string&gt;();
  foreach (var item in User.LoadSortedByName())
  {
      Users.Add(item.Name+"\n");
  } 
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;p&gt;@Html.TextBox("user", "")
   $(function () {
             $("input#user").autocomplete('@Model.Users');
  });
  </code></pre>
  
  <hr>
  
  <p><strong>UPDATE - SIMPLIFIED ATTEMPT and STILL NOT WORKING</strong></p>
  
  <p>_layout</p>
  
  <pre><code>&lt;script src="@Url.Content("~/Scripts/jquery.autocomplete.js")" type="text/javascript"&gt;&lt;/script&gt;
  
  View
  
  
    &lt;p&gt;&lt;input type="text" id="tags" /&gt;&lt;/p&gt;
  
  &lt;script type="text/javascript"&gt;
      $(function () {
              var availableTags = [
              "ActionScript",
              "AppleScript",
              "Asp",
              "BASIC",
              "C",
              "C++",
              "Clojure",
              "COBOL",
              "ColdFusion",
              "Erlang",
              "Fortran",
              "Groovy",
              "Haskell",
              "Java",
              "JavaScript",
              "Lisp",
              "Perl",
              "PHP",
              "Python",
              "Ruby",
              "Scala",
              "Scheme"
          ];
          $( "#tags" ).autocomplete({
              source: availableTags
          });
  
  
      });
  </code></pre>