Autopostback on a large DropDownList

Y

Yahya Saad

Dear All,

I have an ASP.Net webform that includes a DropDownList (bound to a
dataview including 6000 records) and a textbox that is updated according to
the selection of an event at the SelectedIndexChange of the DropDownList.
Filling the DropDownList takes about 3 seconds but when the SelectedIndex of
the DropDownList is changed it takes about a minute for the webform to
respond. How can i speed up my pages response, knowing that I have tried to
cache the page and the dataview and performance was the same.

Regards,
Yahya Saad
 
S

Scott Allen

One approach you could try is to set the EnableViewState property on
the dropdown list to false. With 6000 items this step should
noticeably decrease the number of bytes sent between the browser and
the server (depending on what else is on the page).

You'll need to do more work on the server side, such as repopulating
the list on each request, and inspecting the Request.Form collection
to see what is selected in the DropDownList, but eliminating the
viewstate for 6000 records could be a big savings.
 
R

Raterus

6000 records in one dropdownlist, are you crazy? It is even worse when you take into consideration that you probably haven't disabled the viewstate...

I think you need to look at other options to make that selection, like a search/paging datagrid.
 
J

John Saunders

Yahya Saad said:
Dear All,

I have an ASP.Net webform that includes a DropDownList (bound to a
dataview including 6000 records) and a textbox that is updated according to
the selection of an event at the SelectedIndexChange of the DropDownList.
Filling the DropDownList takes about 3 seconds but when the SelectedIndex of
the DropDownList is changed it takes about a minute for the webform to
respond. How can i speed up my pages response, knowing that I have tried to
cache the page and the dataview and performance was the same.

For one thing, if I were you, I'd reconsider the use of a DropDownList for
so many list items. That's a very long way for your users to have to scroll.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top