Large dropDownList slow in UpdatePanel



I have a large DropDownList that is very slow when it's in an
UpdatePanel. The initial loading of the page is not slow, only the
PostBack is slow. When I do not use the UpdatePanel PostBacks are
very fast. I have EnableViewState set to false for this DropDownBox.

Using the debugger I see that the Code Behind is entered quickly. The
slowdown happens sometime after OnUnload occurs. I think it happens
when refreshing the page.

To duplicate the problem create a page with a ScriptManager and
UpdatePanel. Add a DropDownList and Button to the UpdatePanel. Here
is the code:
<html xmlns="" >
<head runat="server">
<title>Untitled Page</title>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:DropDownList ID="DropDownList1" runat="server"

In Page_load add the code below to add 6,000 rows to the DropDownList:
protected void Page_Load(object sender, EventArgs e)
for (int i = 0; i < 6000; i++)
DropDownList1.Items.Add("A" + i);

Run the page and click the button. The PostBack is very slow - about
35 seconds.
Now move the Button outside of the UpdatePanel. This causes the
entire page to refresh when a PostBack is performed. This takes about
2 seconds.

Peter Bromberg [C# MVP]

The only response I can give is that the UpdatePanel is having to use XmlHttp
to marshal a large amount of "string-ified" data over the wire and reassemble
it in the callback to fit your control's needs. There are some situations
where AJAX just doesn't "fit" and this is probably one of them. Either that,
or don't bring back so much data at one time.
-- Peter


Hanumantha said:
How did you fix this issue, i am also facing same issue, do let me know the steps you took to fix this


Why is it in an update Panel? What are you doing?
You might be able to do everything in client, or not - depending on what
you're doing this can speed it up. It can slow it down, since Firefox 2
is very slow at excuting client side code and prefers the processing to
be done on the server.


How did you fix this issue, i am also facing same issue, do let me know the steps you took to fix this


I just took it out of the update panel and I let the entire page

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question