axawire
asked on
AJAX with Listbox response time problem.
Hi,
I am using visual studio 2005 with c# for an AJAX enabled asp webpage.
I have an AJAX update panel with one textbox, one command button and one listbox. The listbox is databound with a stored procedure that takes one paramter and it uses the textbox for this (the stored procedure basically performs a search based on the textbox). When you click the command button it calls performs listbox.databind() and listbox.visible = true. The listbox updates with about 8000 records in about 1 second. The listbox is set to autopostback=true and I have the event selectedindexchange execute the code textbox.text = listbox.selectedvalue; listbox.visible = false; This takes at least 10 seconds to complete :( or instead if I just go to update the listbox again using the command button it takes about 10 seconds to update. If though I do select an item in the listbox and wait for the listbox to disappear and then press the command button again it executes in about 1 second again.
How can i speed this up?
Thanks.
I am using visual studio 2005 with c# for an AJAX enabled asp webpage.
I have an AJAX update panel with one textbox, one command button and one listbox. The listbox is databound with a stored procedure that takes one paramter and it uses the textbox for this (the stored procedure basically performs a search based on the textbox). When you click the command button it calls performs listbox.databind() and listbox.visible = true. The listbox updates with about 8000 records in about 1 second. The listbox is set to autopostback=true and I have the event selectedindexchange execute the code textbox.text = listbox.selectedvalue; listbox.visible = false; This takes at least 10 seconds to complete :( or instead if I just go to update the listbox again using the command button it takes about 10 seconds to update. If though I do select an item in the listbox and wait for the listbox to disappear and then press the command button again it executes in about 1 second again.
How can i speed this up?
Thanks.
are you using inline-sql?
ASKER
nope.
ASKER
I guess I should elaborate further... I did forget to mention the sqldatasource control on the AJAX update panel too... This is set to a stored procedure that references the textbox as an input paramter and the listbox is tied to this sqldatasource, I just used went through the configure data sources wizard etc nothing special.
ASKER
After many trials It appears that the gridview and repeater both populate resonabily quickly the first time, On additional asyncpostbacks though when there is a large amount of data in the controls the response time is awefull even if its just to hide the control which is the same symptons as the listbox control. On the other hand if I take them out of the update panel or add a trigger for them to do a full post back the response time is with in 1 or 2 seconds, much better than the 10 second+ response time otherwise.
ASKER
I am reluctantly going to use the full post back solution.
Wow, you've taught me something here, I've been having same issues.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.