We want to be able to filter the data for the AutoComplete widget on the server side. We can either use the
data property within the
DataSource lambda expression. Let's say, for example, that we want to be able to choose what type of states and territories show up in the AutoComplete widget. We can accomplish this by sending some data along with the request, then having the server revise the data that it sends back. Replace the contents of
AutoCompletePage.cshtml with this updated code.
<h2>AutoCompletePage</h2> <label for="stateType">Choose whether to see States:</label> <select id="stateType" name="stateType"> ...