In the View we have added the reference of our ViewModel. We have used @Html.EditorFor to render control for our Username property. This will render a textbox control with id and name attribute set to Username. In the script section we have created a array of football players. This array is used as source for autocomplete function. We have used id of textbox to select the textbox and used autocomplete function to use the autocomplete functionality.In the above example, with the result, we are also showing the categories to which result belongs.Layout :

The above is our layout. We need to include references of above script files. This layout is referred in out View.Demo :Type r in the textbox.In the above demo, when you enter any letter, the autocomplete widget shows the possible values for the entered letter. The result will be shown category wise.This is how jQuery Autocomplete works and we can integrate in MVC3 Razor in above way.