This is entirely possible by overriding the two methods below in
asp.net System.Web.UI.Page: SavePageStateToPersistentMedium() LoadPageStateFromPersistenceMedium()
In the first method, you need to check if the ViewState exists in the cache and if it is not stored there, in the second method you can get it if it already exists.
You can combine SessionID and folder_name as the key for the viewStateKey cache.
Alireza shahriyari
source share