Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Ajax & Large Listbox (http://www.velocityreviews.com/forums/t525725-ajax-and-large-listbox.html)

Jeremy 07-30-2007 04:05 PM

Ajax & Large Listbox
 
I've got a very large listbox that gets populated using ajax. The listbox
and a button are in a panel inside an update panel. The button click of the
button sets the panel visible property to false. Everything works nice and
snappy except for when I click the button. The panel takes about 20 or so
seconds to dissapear. I think the ajax call has been made and the browser
is executing some javascript synchronously because the browser is blocking
and doesn't responde for those 20 or so seconds. My guess is the
javascriptis part of the ajax stuff because I didn't write any special
javascript to execute when the button is clicked. Does anybody know what
could be going on and how I can get rid of this slow response?



Teemu Keiski 07-30-2007 06:00 PM

Re: Ajax & Large Listbox
 
Hi,

I think it's because with UpdatePanel the ViewState is posted also to the
server, so it's suffering because of that. How large us the ListBox, how
many items does it have? If you don't use UpdatePanel how long does it take
to make a full postback, does it also take that 20 seconds or more?

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


"Jeremy" <nospam@please.com> wrote in message
news:%23OKj1Os0HHA.4824@TK2MSFTNGP02.phx.gbl...
> I've got a very large listbox that gets populated using ajax. The listbox
> and a button are in a panel inside an update panel. The button click of
> the button sets the panel visible property to false. Everything works
> nice and snappy except for when I click the button. The panel takes about
> 20 or so seconds to dissapear. I think the ajax call has been made and
> the browser is executing some javascript synchronously because the browser
> is blocking and doesn't responde for those 20 or so seconds. My guess is
> the javascriptis part of the ajax stuff because I didn't write any special
> javascript to execute when the button is clicked. Does anybody know what
> could be going on and how I can get rid of this slow response?
>




Steve C. Orr [MCSD, MVP, CSM, ASP Insider] 07-30-2007 09:14 PM

Re: Ajax & Large Listbox
 
You might try making the panel invisible via JavaScript instead.
Something along these lines should do the trick:
MyPanel.style.display='none';

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net



"Jeremy" <nospam@please.com> wrote in message
news:%23OKj1Os0HHA.4824@TK2MSFTNGP02.phx.gbl...
> I've got a very large listbox that gets populated using ajax. The listbox
> and a button are in a panel inside an update panel. The button click of
> the button sets the panel visible property to false. Everything works
> nice and snappy except for when I click the button. The panel takes about
> 20 or so seconds to dissapear. I think the ajax call has been made and
> the browser is executing some javascript synchronously because the browser
> is blocking and doesn't responde for those 20 or so seconds. My guess is
> the javascriptis part of the ajax stuff because I didn't write any special
> javascript to execute when the button is clicked. Does anybody know what
> could be going on and how I can get rid of this slow response?
>




All times are GMT. The time now is 06:03 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.