I have the AutoCompletBox working on a form, but I want to make sure that I'm doing this right and that there isn't a more efficient way to use this control.
It appears that we have to have this code block below in the postback section of the webpage in order for the AutoCompleteBox to work properly. We are setting the DataSource to a datatable. This datatable will end up having over 10,000 rows. Since this has to be in the postback section to work, everytime the form does a post back it has to retrieve all of those rows whether the user is typing in the AutoCompleteBox or not. And it will retrieve all 10,000 rows and then filter them down with every 3 second pause in the typing of the AutoCompleteBox.
I assume that there is a better way to do this. I suppose that we could use a webservice, but doesn't it still require all 10,000 rows to be pulled in each time even after the user has typed a few letters? Am I correct that this tool always wants the full list and then it filters the rows down afterward? Does it require this list of rows to be retrieved with each postback?
Code block in postback:
ACInSite.DataSource = SQLRowToDt(ConnStr, "Select siteName, siteID From site")
ACInSite.DataTextField = "siteName"
ACInSite.DataValueField = "siteID"
ACInSite.DataBind()