Displaying PartialView when user enters text? Like an Autocomplete feature?
I've watch the videos on asp.net and I've looked online and have found nothing.

I have a search box on a site, that searches for recipes. Each recipe has a what you're making image, a title, and type(dessert, lunch, dinner).

All of these items are in a DataService, which I can query against and get a list of the items they are searching for.

Now I'm using VB's ASP.NET MVC3 w/ Razors for the site and I'm trying to get some auto completeness going on when the user enters text.

What should happen is when the user enter text, it will call an ActionResult in the Search Controller. Which queries the DataService and puts all the search results in a model. With that model I return a PartialView, results, with the Model included.

And it should display that partial view, but when the users deletes all the text I will remove the partial view.

Here's what I implemented. In the Layout View

    @Code
      Using Ajax.BeginForm("FastSearchResults", "Search", "", New AjaxOptions With {.UpdateTargetId = "searchitems", .HttpMethod = "GET", .InsertionMode = InsertionMode.Replace})
          Html.BeginForm("Results", "Search", FormMethod.Get)
               @<input type="text" name="id" id="searchbox" data-autocomplete="@Url.Action("FastSearchResults", "Search")" class="recipevox" value="Search Movie Title or Actor Here" />
          Html.EndForm()
      End Using 
    End Code
    <span id="searchitems"></span>


The FastResult Method

        Function FastSearchResults(ByVal id As String) As ActionResult
            Dim model = search.FastSearch(id)
            Return PartialView("_FastSearchResults", model)
        End Function

Javascript Code

    $(document).ready(function () {
          $(":input[data-autocomplete]").autocomplete({ source: $(this).attr("data-autocomplete") }); });

I curious as to why this doesn't work, what else am I missing?
Displaying PartialView when user enters text? Like an Autocomplete feature?
===

I've watch the videos on asp.net and I've looked online and have found nothing.

I have a search box on a site, that searches for recipes. Each recipe has a what you're making image, a title, and type(dessert, lunch, dinner).

All of these items are in a DataService, which I can query against and get a list of the items they are searching for.

Now I'm using VB's ASP.NET MVC3 w/ Razors for the site and I'm trying to get some auto completeness going on when the user enters text.

What should happen is when the user enter text, it will call an ActionResult in the Search Controller. Which queries the DataService and puts all the search results in a model. With that model I return a PartialView, results, with the Model included.

And it should display that partial view, but when the users deletes all the text I will remove the partial view.

Here's what I implemented. In the Layout View

    @Code
      Using Ajax.BeginForm("FastSearchResults", "Search", "", New AjaxOptions With {.UpdateTargetId = "searchitems", .HttpMethod = "GET", .InsertionMode = InsertionMode.Replace})
          Html.BeginForm("Results", "Search", FormMethod.Get)
               @<input type="text" name="id" id="searchbox" data-autocomplete="@Url.Action("FastSearchResults", "Search")" class="recipevox" value="Search Movie Title or Actor Here" />
          Html.EndForm()
      End Using 
    End Code
    <span id="searchitems"></span>


The FastResult Method

        Function FastSearchResults(ByVal id As String) As ActionResult
            Dim model = search.FastSearch(id)
            Return PartialView("_FastSearchResults", model)
        End Function

Javascript Code

    $(document).ready(function () {
          $(":input[data-autocomplete]").autocomplete({ source: $(this).attr("data-autocomplete") }); });

I curious as to why this doesn't work, what else am I missing?