ASP.NET ComboBox - Load Items on Button Click

Load Items



The items of the ComboBox can be loaded on-demand (via AJAX requests).
This sample showcases the loading of ComboBox items when an external button is clicked.
Thus, the page will load very fast because no item is loaded on page load.
Also, the overhead on the backend database server will be reduced, because the database is hit
only when the button is clicked, instead of each time the end user types a character.

In order to enable the on demand loading feature, set the EnableLoadOnDemand property to true.
You also need to handle the LoadingItems server-side event, which is executed each time the ComboBox
requests items from the server via AJAX. The server-side event handler will load all the items that match the text typed in the input field.



« Back to examples