asp.net what to use instead of viewstate -


Currently I'm using ViewStart to store the current page number, when I paging through data I do I have 3 controls on the page that have the data through I page.

The easiest way to keep track of page numbers so far is ViewStat, but it is actually growing up and I do not know why. / P>

So I would like to use something else to keep the page number look, but I'm not sure what it will be. Should I embed this as hidden form field? Pass it in the query string? Other good options?

You are telling that you are using ViewState to store the current page number, And by this I think that you are clearly storing this number in the viewstate.

However, asp.net will store the lot of the data in the viewstate by default in your example, 3 controls with paging enabled, asp.net "All data in control" I.e. stores all data that are currently being shown in 3 controls, they will be stored in the viewstate.

A For this to be resolved, the "off" viewstate can be explicitly closed on 3 paged controls, unfortunately this means that you will have to reboot the controls on each load load, which Can you have an option or not?

If you need to store the page number, you can transfer it to the control state as described on it.

Use a query string as suggested in another answer.

Or you can just continue to use the viewstate, and then continue to close the viewstation for the entire page or just paging-control. Whatever works for you.

I literally explain the depth of Mrinal Bhabhababhata Viewstate.


Comments