Hi! You can do that using Jquery UI and MVC, download Jquery UI
here
Here is an example of code from this implementation.
Javascript:
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$("#YOUR_TEXTBOX_ID").autocomplete({
minLength: 1,
source: function (request, response) {
$.ajax({
type: 'GET', url: 'YOUR_MVC_JSON_URL',
data: { 'term': request.term },
contentType: "application/json; charset=utf-8",
dataType: "json", success: function (data) {
response(data);
}
});
}
});
});
</script>
C# MVC
public ActionResult MyAutoComplete(string term)
{
string[] names =Do your Database consultation.
return Json(names, JsonRequestBehavior.AllowGet);
}