We help IT Professionals succeed at work.

AJAX with Listbox response time problem.

axawire
axawire asked
on
558 Views
Last Modified: 2013-11-26
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.
Comment
Watch Question

are you using inline-sql?

Author

Commented:
nope.

Author

Commented:
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.

Author

Commented:
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.

Author

Commented:
I am reluctantly going to use the full post back solution.
Wow, you've taught me something here, I've been having same issues.
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.