ME
Meena
Syncfusion Team
February 2, 2012 08:53 AM UTC
Hi Mark,
Thanks for using Syncfusion products.
Your requirement of sending the data list of AutoCompleteTextBox with the initial page without Http post could be achieved by enabling the DataSource property of the AutoCompleteTextBox. Please refer the below code snippet,
[Controller]
public ActionResult Index()
{
AutocompleteTextBoxModel myModel = new AutocompleteTextBoxModel();
Northwind context = SqlCE;
var dataSource = from suggestion in context.Customers
select suggestion.CustomerID;
myModel.DataSource = dataSource;
ViewData["myAutocomplete"] = myModel;
return View();
}
The DataSource property is used to fetch the data list without HttpPost.
ClientDataFetch is a feature of AutoComplete which is used to filter the data list from client side without any post.
We have created a simple sample with AutoComplete for your convenience and it can be downloaded from the below link.
AutoCompleteTextBox.zip
Please let us know if you have any other concerns.
Regards,
Meena