Last post Jun 02, 2011 11:14 PM by Mamba Dai - MSFT
Jun 01, 2011 08:14 AM|breath2k|LINK
I am told it is not possible to access viewstate from a webmethod, however, I have a list of objects saved as a viewstate variable to save the list being loaded constantly and wasting time, it works really well and I don't want to have to change it.
My issue is an ajax webmethod I use changes one of the items in the list and so I need to recreate or alter that one item manually. Is there no way to call another function or reset the viewstate or anything from a webmethod??
Jun 01, 2011 10:04 AM|HiteshChauhan|LINK
You can cache view state at server side. if application deployed in web farm then use outproc for caching.
Jun 01, 2011 10:13 AM|breath2k|LINK
Sorry but your answer is not very clear, can you provide a bit more detail and is not deployed in web farm.
Jun 02, 2011 11:14 PM|Mamba Dai - MSFT|LINK
The ViewState just enable you to save and retrieve data in multiple requests for the same page. If you want to reset ViewState in different pages by using webmethod, that's impossible and I suggest you to use another approach such as Sesion, Cookie to address
More information about ViewState, Session and Cookie please refer to the links below: