I want to keep viewstate of a specific page in session but following code block does not help me, what might I be missing?
So here is the code-behind file content of
The important part of the code is
protected override PageStatePersister PageStatePersister { get { return new SessionPageStatePersister(this); } }
This overrides the normal page state persister and provides one that persists the page data to the Session instead of the ViewState.