I am not able to use a Web Service or Page Method (using Model View Presenter framework), so I am trying to implement a AutoCompleteBox with Server-Side Binding.
My data is coming back in a class that I want to bind a contact Name and ID to AutoCompleteBox and I am trying to figure out how to do it without much luck. So basically I have:
var contacts = Presenter.GetContactData(searchText);
I was hoping i could do something like this but having no luck:
protected void Page_Load(object sender, EventArgs e)
{
Presenter.OnLoad();
acbInsured.DataTextField = "FullName";
acbInsured.DataValueField = "ClientKey";
acbInsured.DataSource = Presenter.Presenter.GetContactData(acbInsured.Text).ToArray();
acbInsured.DataBind();
}
Is there I way to bind to just an IEnumerable<SomeClass>?