.Net Microsoft Ajax Viewstate issue

A former colleague developed an app that was largely an editable grid (think about a schedule).

For this, MS Ajax was used and the grid was wrapped in the Update panel.

To make things worse, the complex object graph was persisted before viewstate

, so every time the page was refreshed i.e. the cell has been updated, the whole mesh and viewstate

sent from client to server in a message back and with a size of viewstate

almost mega performance - pants.

From my understanding of Ajax, we should only transfer minimal amounts of data and only what is needed. This will require rewriting and will be costly. What other alternatives are there?

0


a source to share


2 answers


Thanks for the answer. The rewriting happens on cards, but we have to update the application in the meantime to keep the customer happy and buy us time to rewrite it.

I need a quick fix list, one of which I will investigate will be storing the ViewState in a SQL database.



Thanks, B

0


a source


Ideally, you should use data grids with ViewsState disabled. This would mean binding the grid to every postback.

ControlState is used instead of ViewState when it is absolutely necessary to preserve the state of any control. You can read more about ControlState here .



EDIT: Also, there are many lightweight ajax-y datagrids available out there. Flexigrid is one of them. This is jQuery .

+2


a source







All Articles