While binding more than 15000 rows into dropdownlist then page is hanged up. I am using the mentioned below code for this.
ddlList1.DataSource = ds.Tables[0];
ddlList1.DataTextField = "EmpID";
ddlList1.DataValueField = "EmpName";
ddlList1.DataBind();
Can anyone please help me for trouble out this problem.
Riyaz AkhtarPosted Jul 25, 2013, 5:49 AM
Iftikar HussainPosted Jul 25, 2013, 5:26 AM
It is not a good idea to load so many records into dropdown. Even though it loads, it will be difficult to user to select particular value from the dropdown. I suggest you can use autocomplete ajax textbox. Please refer the below link
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx
http://www.asp.net/ajaxlibrary/act_autocomplete.ashx
Regards,
Iftikar
Raj BandiPosted Jul 25, 2013, 5:16 AM
15000 items in a dropdown?. My advice is not to load so many items in it at a time. It degrades browser performance.
Try to use
load on demand technique like an auto complete textbox from AjaxControlToolKit.
or
Build your own control that loads subset of items from server on some scroll change event (ajax )
Cheers,
Raj