title: Autocomplete with MVC 4 / Razor
body: <p>I think I am missing something obvious while attempting to add autocomplete functionality in MVC 4.  From what I have found in other posts I have been able to put together an example however the method in my controller is not being called.</p>
  
  <p>What I have tried so far...</p>
  
  <p>_Layout</p>
  
  <pre><code>@Styles.Render("~/Content/themes/base/css")
  @Scripts.Render("~/bundles/jquery")
  @Scripts.Render("~/bundles/jqueryui")
  @Scripts.Render("~/bundles/jqueryval")
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>Public Function Numbers(term As String) As ActionResult
      Return Json(New String() {"one", "two", "three", "four", "five", "six"}, JsonRequestBehavior.AllowGet)
  End Function
  </code></pre>
  
  <p>View (I have hard coded the Home/Numbers for now)</p>
  
  <pre><code>&lt;div class="editor-label"&gt;
      @Html.LabelFor(Function(model) model.Number)
  &lt;/div&gt;
  &lt;div class="editor-field"&gt;
      @Html.EditorFor(Function(model) model.Number)
      @Html.ValidationMessageFor(Function(model) model.Number)
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      $(function () {
          $("#Number").autocomplete({
              source: 'Home/Numbers',
              minLength: 1
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>When I run my app and type in the textbox nothing happens.  I have put a breakpoint in the "Numbers" function and it seems that it is never called.</p>
  
  <p>My project can be found here <a href="http://www.filedropper.com/testapp" rel="noreferrer">http://www.filedropper.com/testapp</a></p>