Hi I have one field called CustomerName it is Dropdown. I want to make this field as Auotcomplete dropdown instead of selecting the value . but i cant get any idea to do this task . im getting lot of confusions so please any one help me to solve this issue
My Controller code
public JsonResult GetCustomers()
{
return Json(db.Customers.ToList(), JsonRequestBehavior.AllowGet);}
My View Code
@Html.Label("Customer Name", new { @class = "control-label" })
@Html.DropDownListFor(model => model.CustomerID, new SelectList(string.Empty, "Value", "Text"), "Please select a Customer", new { @class = "form-control required", type = "text" })
My J-query Code
$(function () {
$.ajax(
'@Url.Action("GetCustomers", "VisitorsForm")',{
type: "GET",
datatype: "Json",
success: function (data) {
$.each(data, function (index, value) {
$('#CustomerID').append('');
});
}
});
});
this is my code it will load the CustomerName in CustomerName Field from Db. Please any one help me to do that Autocomplete dropdown task. I tried manys but no use no one is working..
Advance Thanks..

Saillesh PawarRank #536 · 4.5K reputationPosted Mar 13, 2016, 9:11 PM EDT
Sneha KRank #2,496 · 563 reputationPosted Mar 13, 2016, 9:14 PM EDT
Saillesh PawarRank #536 · 4.5K reputationPosted Mar 13, 2016, 9:42 PM EDT
AmanRank #607 · 3.9K reputationPosted Mar 14, 2016, 2:14 AM EDT
Sneha KRank #2,496 · 563 reputationPosted Mar 14, 2016, 2:28 AM EDT