ASPX page closing slowly with large datagrid

C

csgraham74

I have an issue with aspx page that displays a large datagrid. When i
click a button and display the grid everyting works fine. when i click
a button on the page which is a response.redirect to another page there
is a very long delay before the button event is fired and the page
redirects.

can anyone advise me about what is happening here and how i can speed
up the firing of the event. i take it has something to do with clearing
the datagrid.

Thanks in advance
 
A

Adrian Bezzina

If the grid has view state enabled on it - the button click is 'posting'
back to the server. This is what is taking a long as the viewstate data is
being 'posted back' to the server.

2 options:
1. If no viewstate is required - disable it.
or
2. Push the view state of the page to be stored on the server
(override the LoadViewStateFromPersitanceMedia and
SaveViewStateFromPersitanceMedia methods) instead of the client.

To view how much viewstate is saved - enable it - save the source, then
disable it and save the source as a different file and compare the sizes -
you should notice a considerable difference.

Regards,
Buzza.
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top